/* =================================================================
   SETU SIGNUP PAGE STYLES
   Matching the login page design system
   ================================================================= */

/* ============ BASE STYLES ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Remove all default input focus styling */
input,
textarea,
select {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

input:focus,
input:focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, #f8f9fc 0%, #e8eaf0 100%) !important;
    background-attachment: fixed !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    top: 0 !important;
}

/* ============ SIGNUP CONTAINER ============ */
.signup-main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ HEADER / NAV ============ */
.signup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    box-sizing: border-box;
}

.signup-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.signup-logo:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.signup-nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.signup-nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-accent);
}

/* ============ MAIN CONTENT AREA ============ */
.signup-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem 3rem;
    /* Move content up by 3% */
    margin-top: -3vh;
}

/* ============ USER ICON ============ */
.user-icon {
    width: 64px;
    height: 64px;
    background-color: var(--text-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: scaleIn 0.4s ease-out 0.2s both;
}

.user-icon svg {
    width: 28px;
    height: 28px;
    color: var(--bg-primary);
    stroke-width: 2.5;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============ HEADING ============ */
.signup-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

.signup-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.signup-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ============ FORM CONTAINER ============ */
.signup-form {
    width: 100%;
    max-width: 360px;
}

/* ============ STEP CONTAINERS ============ */
.step-container {
    animation: fadeInUp 0.4s ease-out;
}

.step-container.hidden {
    display: none;
}

/* ============ INPUT GROUP ============ */
.input-group {
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.4s ease-out both;
}

.input-group:nth-child(1) {
    animation-delay: 0.3s;
}

.input-group:nth-child(2) {
    animation-delay: 0.4s;
}

.input-group:nth-child(3) {
    animation-delay: 0.5s;
}

.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

/* ============ INPUT WRAPPER ============ */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-light);
    border-radius: 0.875rem;
    padding: 0 1rem;
    transition: all 0.25s ease;
}

.input-wrapper:focus-within {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.08);
}

.input-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

.custom-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 1rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none !important;
    font-family: inherit;
    /* Remove tap highlight and focus rectangle on mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none !important;
}

.custom-input:focus,
.custom-input:focus-visible,
.custom-input:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-box-shadow: none !important;
}

.custom-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* ============ AUTOFILL STYLING FIX ============ */
/* Override browser autofill background to match our design */
.custom-input:-webkit-autofill,
.custom-input:-webkit-autofill:hover,
.custom-input:-webkit-autofill:focus,
.custom-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-secondary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    box-shadow: 0 0 0 1000px var(--bg-secondary) inset !important;
    background-color: transparent !important;
    transition: background-color 9999s ease-out, color 9999s ease-out;
    caret-color: var(--text-primary);
}

.custom-input.uppercase {
    text-transform: uppercase;
}

.custom-input.uppercase::placeholder {
    text-transform: uppercase;
}

/* ============ ERROR MESSAGE ============ */
.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    margin-left: 0.25rem;
    font-weight: 500;
    display: none;
}

/* ============ STEP NAVIGATION ============ */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    animation: fadeInUp 0.4s ease-out 0.6s both;
}

/* ============ AUTH NOTE (Has account? Log in) ============ */
.auth-note {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.auth-note-text {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-note-link {
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 0.25rem;
    transition: color 0.2s ease;
}

.auth-note-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* ============ ARROW BUTTON (Next) ============ */
.arrow-btn {
    width: 52px;
    height: 52px;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.arrow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.arrow-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============ BACK BUTTON ============ */
.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    font-family: inherit;
}

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

.back-btn svg {
    width: 16px;
    height: 16px;
}

/* ============ SUBMIT BUTTON ============ */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    font-family: inherit;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-btn:disabled {
    opacity: 0.8;
    pointer-events: none;
}

.submit-btn svg {
    width: 18px;
    height: 18px;
}

/* ============ LOADING SPINNER ============ */
.submit-btn .spinner,
.arrow-btn .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ TOAST CONTAINER ============ */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    width: 100%;
    max-width: 360px;
}

.toast {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============ GOOGLE TRANSLATE HIDE ============ */
#google_translate_element {
    position: absolute;
    top: -9999px;
    left: -9999px;
}

.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
.goog-te-gadget-simple,
.goog-te-menu-value span:first-child {
    display: none !important;
}

/* Ensure Google translate doesn't push body down */

/* ============ CALENDAR ICON STYLING ============ */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 0.8;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

/* Mobile adjustments */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .nav-header {
        padding: 1rem 1.25rem;
    }

    .signup-container {
        padding: 0 1.25rem 2rem;
    }

    .signup-title {
        font-size: 1.75rem;
    }

    .user-icon {
        width: 56px;
        height: 56px;
        border-radius: 0.875rem;
    }

    .user-icon svg {
        width: 24px;
        height: 24px;
    }

    .arrow-btn {
        width: 48px;
        height: 48px;
    }
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .signup-container {
        padding: 0 2rem 3rem;
    }

    .signup-form {
        max-width: 400px;
    }

    .signup-title {
        font-size: 2.25rem;
    }

    .user-icon {
        width: 72px;
        height: 72px;
        border-radius: 1.25rem;
    }

    .user-icon svg {
        width: 32px;
        height: 32px;
    }
}

/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.custom-input:focus-visible,
.arrow-btn:focus-visible,
.submit-btn:focus-visible,
.back-btn:focus-visible,
.auth-note-link:focus-visible,
.signup-nav-link:focus-visible,
.signup-logo:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}