/**
 * Nicer.travel Advisor Onboarding
 * Custom styles to complement Tailwind CSS
 */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Nicer.travel brand colors - updated to match public site */
:root {
  --primary: var(--gray800);
  --gray50: #F2F2F2;
  --gray100: #E6E6E6;
  --gray150: #D9D9D9;
  --gray200: #CCCCCC;
  --gray300: #B3B3B3;
  --gray400: #999999;
  --gray500: #808080;
  --gray600: #666666;
  --gray700: #4D4D4D;
  --gray800: #333333;
  --gray850: #262626;
  --gray875: #202020;
  --gray900: #1A1A1A;
  --easeOutExpo: cubic-bezier(0.16,1,0.3,1);
  --easeOutBack: cubic-bezier(0.34,1.56,0.64,1);
  
  /* Legacy color variables for compatibility */
  --nicer-primary: var(--gray800);
  --nicer-secondary: #FFF2CC;
  --nicer-primary-hover: var(--gray700);
  --nicer-secondary-hover: #FFE9B0;
  --nicer-text: var(--gray800);
  --nicer-light-bg: var(--gray50);
  --nicer-border: var(--gray200);
  --nicer-error: #C14141;
  --nicer-success: #4CAF50;
  --nicer-muted: var(--gray600);
  --nicer-light-gray: var(--gray100);
}

/* Base styles - improved typography to match public site */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  color: var(--nicer-text);
  line-height: 1.6;
  background-color: #fff2e5;
}

h1, h2, h3 {
  font-family: 'The Seasons', Georgia, serif;
  font-weight: 400;
  line-height: 1.3;
}

/* Enhanced container styling to match public site */
.container {
  max-width: 480px;
}

/* Header improvements to match public site aesthetic */
header {
  margin-bottom: 2rem;
}

header .font-seasons {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

header p {
  color: var(--nicer-muted);
  font-size: 1.1rem;
  font-weight: 400;
}

/* Card styling improvements to match public site */
.bg-white {
  background-color: white;
  border: 1px solid var(--nicer-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Form styling improvements */
input, textarea, select {
  border: 1.5px solid var(--gray300);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s var(--easeOutExpo);
  background-color: white;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

label {
  font-weight: 500;
  color: var(--nicer-text);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* Enhanced button styling to match public site exactly */
.nicer-btn {
  font-family: Inter, sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  border: 0;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  outline: none;
  text-decoration: none;
  font-size: 12px;
  line-height: 20px;
  height: 48px;
  border-radius: 24px;
  padding-inline: 24px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s var(--easeOutExpo);
}

.nicer-btn:hover {
  background-color: var(--gray700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(51, 51, 51, 0.15);
}

.nicer-btn:active {
  transform: translateY(0);
  transition: all 0.1s var(--easeOutExpo);
}

.nicer-btn-secondary {
  background-color: var(--gray100);
  color: var(--primary);
  border: 1px solid var(--gray200);
  font-family: Inter, sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  font-size: 12px;
  line-height: 20px;
  height: 48px;
  border-radius: 24px;
  padding-inline: 24px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--easeOutExpo);
}

.nicer-btn-secondary:hover {
  background-color: var(--gray150);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.nicer-btn-secondary:active {
  transform: translateY(0);
  transition: all 0.1s var(--easeOutExpo);
}

/* Progress indicator styling */
.progress-step {
  color: var(--nicer-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.progress-step.active {
  color: var(--nicer-primary);
}

.step-active {
  background-color: var(--primary);
}

/* Video container improvements */
.video-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

/* OTP input styling improvements */
.otp-input {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--gray300);
  border-radius: 8px;
  margin: 0 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', 'Arial', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 1;
  font-variant-numeric: tabular-nums;
}

.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

/* Phone input container styling */
.phone-input-container input {
  border: 2px solid var(--gray300);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
}

/* Link styling to match public site */
a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s var(--easeOutExpo);
}

a:hover {
  color: var(--gray700);
  text-decoration: underline;
}

/* Footer styling */
footer {
  color: var(--nicer-muted);
  font-size: 0.875rem;
}

/* Transitions */
.step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s var(--easeOutExpo);
}

.step.active {
    display: block;
    opacity: 1;
}

.step.hidden {
    display: none;
    opacity: 0;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s var(--easeOutExpo);
}

/* File upload area */
#upload-area {
    transition: all 0.2s var(--easeOutExpo);
    border: 2px dashed var(--gray300);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: var(--nicer-light-gray);
}

#upload-area.highlight {
    border-color: var(--primary);
    background-color: rgba(51, 51, 51, 0.05);
}

/* Custom scrollbar for agreement text */
#agreement-text::-webkit-scrollbar {
    width: 8px;
}

#agreement-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#agreement-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#agreement-text::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Progress bar animation */
@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}

.animate-progress {
    animation: progress 1.5s var(--easeOutExpo);
}

/* Avatar container */
#avatar-preview {
    position: relative;
    border: 2px solid var(--gray200);
    transition: border-color 0.2s var(--easeOutExpo);
    border-radius: 50%;
    width: 5rem;
    height: 5rem;
}

#avatar-preview:hover {
    border-color: var(--primary);
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.animate-checkmark {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 1s var(--easeOutExpo) forwards;
}

/* Optional sections toggle animation */
#optional-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--easeOutExpo);
}

#optional-fields:not(.hidden) {
    max-height: 1000px;
}

/* Form validation styles */
input.error, textarea.error {
    border-color: var(--nicer-error);
    box-shadow: 0 0 0 3px rgba(193, 65, 65, 0.1);
}

.error-message {
    color: var(--nicer-error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(203, 213, 224, 0.3);
    border-radius: 50%;
    border-top: 3px solid var(--primary);
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .otp-input {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
        margin: 0 0.125rem;
    }
}