/**
 * Signup Page Styles
 * Multi-step registration form styling
 * Uses Kopitiam design system variables from auth-variables.css
 */

/* Input wrapper for password toggle */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--muted);
    padding: 4px;
    z-index: 1;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text);
}

.input-wrapper input[type="password"],
.input-wrapper input[type="text"].password-field {
    padding-right: 44px;
    width: 100%;
}

/* Password requirements */
.password-requirements {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}

.password-requirements.valid {
    color: #22c55e;
}

.password-requirements.invalid {
    color: #dc3545;
}

/* Form divider */
.form-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--muted);
    font-size: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--stroke);
}

.form-divider span {
    padding: 0 12px;
}

/* Google button - matches Kopitiam style */
.btn-google {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--stroke);
    border-radius: 6px;
    background: var(--card);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: var(--bg);
    border-color: var(--text);
}

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Signup footer */
.signup-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--muted);
}

.signup-footer a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.signup-footer a:hover {
    text-decoration: underline;
}

/* Back link - already in login.css but keeping for consistency */
.back-link {
    position: absolute;
    top: 32px;
    left: 32px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text);
}

/* Messages */
.success-message {
    padding: 12px 16px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.08);
    color: #166534;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
    text-align: left;
}

.error-message {
    padding: 12px 16px;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 6px;
    background: rgba(220, 53, 69, 0.08);
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
    text-align: left;
}

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

.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Loading Overlay - Kopitiam style */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(240, 239, 234, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    gap: 20px;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--stroke);
    border-top: 3px solid var(--text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--text);
    font-weight: normal;
}

.loading-subtext {
    font-size: 14px;
    color: var(--muted);
    margin-top: -12px;
}

/* Progress Steps - Kopitiam style */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 8px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step-number.active {
    background: var(--text);
    color: var(--card);
}

.step-number.completed {
    background: #22c55e;
    color: white;
}

.step-number.inactive {
    background: var(--stroke);
    color: var(--muted);
}

.step-label {
    font-size: 13px;
    color: var(--muted);
    display: none;
}

@media (min-width: 400px) {
    .step-label {
        display: block;
    }
}

.step-label.active {
    color: var(--text);
    font-weight: 500;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--stroke);
    transition: background 0.3s ease;
}

.step-connector.completed {
    background: #22c55e;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Secondary button - matches Kopitiam style */
.btn-secondary {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--stroke);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--text);
}

/* Email display - Kopitiam style */
.email-display {
    background: var(--bg);
    border: 1px solid var(--stroke);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-display i {
    color: #22c55e;
    font-size: 1.1rem;
}

.email-display .email-text {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.email-display .change-email {
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.email-display .change-email:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Email display with verified badge */
.email-display.verified {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
}

.email-display .verified-badge {
    font-size: 12px;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.email-display .verified-badge i {
    font-size: 14px;
}

/* Verification info text */
.verification-info {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Verification code inputs */
.verification-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    font-family: var(--sans);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    transition: all 0.2s ease;
}

.code-input:focus {
    outline: none;
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(25, 25, 25, 0.1);
}

.code-input.filled {
    background: var(--bg);
}

.code-input.error {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

/* Resend section */
.resend-section {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--muted);
}

.resend-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.resend-btn:hover {
    background: var(--bg);
}

.resend-btn i {
    font-size: 16px;
}

/* Mobile responsive for verification inputs */
@media (max-width: 400px) {
    .code-input {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
    
    .verification-inputs {
        gap: 6px;
    }
}
