/* signup.css - Enhanced brand-consistent signup page styles with phone number support */
/* Brand Colors: Primary #00ADB4 (teal), Secondary #008B94 (darker teal), Accent #5FDEE2 (lighter teal) */

/* Reset and Base Styles for Signup Page */
.signup-body {
    background: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
}

.signup-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 173, 180, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.signup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #00ADB4;
}

/* Header Styles */
.signup-header {
    text-align: center;
    margin-bottom: 32px;
}

.signup-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    margin-top: 0;
}

.signup-subtitle {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* Forgot Password Header Styles */
.forgot-password-header {
    text-align: center;
    margin-bottom: 24px;
}

.forgot-password-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    margin-top: 0;
}

.forgot-password-header p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* Form Sections with Smooth Transitions */
.form-section {
    margin-bottom: 24px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.form-section.hidden {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    margin: 0;
    overflow: hidden;
}

/* Form Groups and Labels */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

/* Form Inputs with Brand Focus States */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #f9fafb;
    font-family: inherit;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #00ADB4;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 173, 180, 0.1);
}

.form-input:invalid:not(:focus) {
    border-color: #ef4444;
}

.form-input.valid {
    border-color: #10b981;
    background: #f0fdf4;
}

.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Phone Input Container */
.phone-input-container {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.country-select {
    flex-shrink: 0;
    padding: 12px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    font-family: inherit;
    box-sizing: border-box;
}

.country-select:focus {
    outline: none;
    border-color: #00ADB4;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 173, 180, 0.1);
}

.phone-input {
    flex: 1;
    min-width: 0;
}

.phone-input-container .form-input {
    margin: 0;
}

/* Password Input with Toggle */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #00ADB4;
    background: #e0f7fa;
}

.password-toggle:focus {
    outline: 2px solid #00ADB4;
    outline-offset: 2px;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* Form Hints and Validation Messages */
.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.4;
}

.form-hint.success {
    color: #10b981;
}

.form-hint.error {
    color: #ef4444;
}

/* Password Requirements Section */
.password-requirements {
    background: #e0f7fa;
    border: 1px solid #b2ebf2;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    font-size: 12px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    margin-bottom: 4px;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement.met {
    color: #00695c;
}

.requirement-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.requirement.met .requirement-icon {
    background: #00ADB4;
    border-color: #00ADB4;
    color: white;
}

/* Button Styles - Brand Consistent */
.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.btn-primary {
    background: #00ADB4;
    color: white;
    border: 1px solid #00ADB4;
}

.btn-primary:hover:not(:disabled) {
    background: #008B94;
    border-color: #008B94;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 173, 180, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:focus {
    outline: 2px solid #00ADB4;
    outline-offset: 2px;
}

/* Messages with Brand Colors */
.message {
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    margin: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.message-success {
    background: #e0f7fa;
    border: 1px solid #00ADB4;
    color: #00695c;
}

.message-info {
    background: #e0f7fa;
    border: 1px solid #b2ebf2;
    color: #00695c;
}

/* Error and Success Messages for Main App */
.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin: 12px 0;
}

.success {
    background: #e0f7fa;
    border: 1px solid #00ADB4;
    color: #00695c;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Loading Spinner - Brand Color */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Verification Section */
.verification-section {
    border-top: 1px solid #e5e7eb;
    margin-top: 24px;
    padding-top: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.verification-section.show {
    opacity: 1;
    transform: translateY(0);
}

.verification-header {
    text-align: center;
    margin-bottom: 20px;
}

.verification-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    margin-top: 0;
}

.verification-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* Login and Navigation Links - All consistent styling */
.login-link, .signup-link, .forgot-password-link, .back-to-login {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.forgot-password-link {
    margin-top: 12px;
}

.back-to-login {
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* All links should look the same - clean and simple */
.login-link a, 
.signup-link a, 
.forgot-password-link a, 
.back-to-login a {
    color: #00ADB4;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.login-link a:hover, 
.signup-link a:hover, 
.forgot-password-link a:hover, 
.back-to-login a:hover {
    color: #008B94;
}

/* Simple arrow for back link */
.back-to-login a::before {
    content: '← ';
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.trial-text {
    text-align: center !important;
    font-size: 14px;
    color: #6b7280 !important;
    margin-top: 12px;
    margin-bottom: 16px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .signup-body {
        padding: 10px;
    }
    
    .signup-container {
        padding: 24px;
        margin: 10px;
        max-width: none;
    }
    
    .signup-title {
        font-size: 24px;
    }
    
    .verification-title {
        font-size: 18px;
    }
    
    .forgot-password-header h2 {
        font-size: 20px;
    }
    
    .form-input {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .phone-input-container {
        gap: 6px;
    }
    
    .country-select {
        padding: 14px 6px;
        min-width: 70px;
        font-size: 13px;
    }
    
    .password-toggle {
        right: 14px;
        padding: 6px;
    }
    
    .btn {
        padding: 16px 24px;
    }
}

/* Tablet styles */
@media (max-width: 768px) {
    .signup-container {
        max-width: 420px;
        padding: 32px;
    }
    
    .phone-input-container {
        gap: 6px;
    }
    
    .country-select {
        min-width: 75px;
    }
}

/* Large screen adjustments */
@media (min-width: 1200px) {
    .signup-container {
        max-width: 520px;
        padding: 48px;
    }
    
    .signup-title {
        font-size: 32px;
    }
    
    .signup-subtitle {
        font-size: 18px;
    }
    
    .forgot-password-header h2 {
        font-size: 28px;
    }
    
    .phone-input-container {
        gap: 12px;
    }
    
    .country-select {
        min-width: 90px;
    }
}

/* Special styling for country flags in select */
.country-select option {
    padding: 8px 12px;
}

/* Phone input specific styling */
.phone-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.phone-input:focus::placeholder {
    color: #d1d5db;
}

/* Enhanced focus states for accessibility */
.country-select:focus-visible,
.form-input:focus-visible,
.btn:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid #00ADB4;
    outline-offset: 2px;
}

/* Accessibility Enhancements */
.form-input:focus,
.country-select:focus,
.btn:focus,
.password-toggle:focus {
    outline: 2px solid #00ADB4;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-input,
    .country-select {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .message {
        border-width: 2px;
    }
    
    .signup-container::before {
        height: 6px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .signup-container,
    .form-section,
    .verification-section {
        transition: none;
    }
}

/* Print styles */
@media print {
    .password-toggle,
    .btn,
    .loading-spinner {
        display: none;
    }
    
    .form-input {
        border: 1px solid #000;
        background: white;
    }
}