/* ==========================================================================
   GoodPillars Premium Design System - Register Redesign
   ========================================================================== */

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

:root {
    /* Color Palette */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --success-bg: #ecfdf5;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-base: #f8fafc;
    --white: #ffffff;

    /* Layout & Styling Tokens */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-full: 9999px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Gradients */
    --bg-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0ea5e9 100%);
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.01);
    --input-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Reset / Core overrides & Scroll elimination */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Prevent scrolling on desktop viewports */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    height: 100vh;
}

/* Override default Laravel main container paddings */
main.py-4 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Loader styling */
.infraloader {
    display: none;
    /* Hide default loader */
}

/* Registration Page Wrapper */
.singup-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Left Column: Form Container (35% Width)
   -------------------------------------------------------------------------- */
.singup-wrapper .column.is-4.bg-m-bg {
    width: 35% !important;
    height: 100%;
    background-color: var(--white);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto;
    /* Scroll individual form column if screens are tiny */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.singup-wrapper .column.is-4.bg-m-bg::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.form-heading {
    padding: 1.75rem 2.25rem 0.5rem 2.25rem;
    text-align: center;
}

.top_logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
    margin-bottom: 0.5rem;
}

.top_logo:hover {
    transform: scale(1.03);
}

.intro-title p {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.form-body {
    padding: 0 2.25rem 1.75rem 2.25rem;
}

/* --------------------------------------------------------------------------
   Interactive Multi-Step Progress Indicators
   -------------------------------------------------------------------------- */
.signup-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    position: relative;
    padding: 0 1rem;
}

.signup-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2.5px;
    background-color: #e2e8f0;
    z-index: 1;
    transform: translateY(-50%);
}

.progress-track {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 0%;
    height: 2.5px;
    background-color: var(--primary-color);
    z-index: 2;
    transform: translateY(-50%);
    transition: var(--transition-smooth);
}

.progress-step {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--border-radius-full);
    background-color: var(--white);
    border: 2.5px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    position: relative;
    z-index: 3;
    transition: var(--transition-smooth);
}

.progress-step.step-active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.progress-step.step-completed {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.progress-label {
    position: absolute;
    top: 2.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

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

.progress-step.step-completed .progress-label {
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Steps Transition Containers
   -------------------------------------------------------------------------- */
.form-step {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.form-step.active {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    opacity: 1;
    transform: translateY(0);
}

/* Form Groups & Controls */
.control-1 {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.control {
    position: relative;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.form-email,
.form-email select {
    width: 100%;
    height: 3rem;
    padding: 0 1rem 0 2.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--white);
    border: 1.5px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    box-shadow: var(--input-shadow);
    outline: none;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

/* Custom styled SELECT dropdown */
select.form-email {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-email::placeholder {
    color: var(--text-muted);
}

.form-email:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), var(--input-shadow);
}

/* Helper details sub-text underneath inputs */
.field-helper {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    margin-left: 0.25rem;
    font-weight: 500;
    text-align: left;
}

/* Overlay Icons in Input Fields */
.control::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    /* Centered nicely on the input height */
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    pointer-events: none;
    z-index: 10;
}

/* Dynamic FontAwesome Icon Binding based on child types */
.control:has(input[name="name"])::before {
    content: "\f007";
}

.control:has(input[name="email"])::before {
    content: "\f0e0";
}

.control:has(input[name="mobile"])::before {
    content: "\f095";
}

.control:has(input[name="school_name"])::before {
    content: "\f19c";
}

.control:has(input[name="address"])::before {
    content: "\f3c5";
}

.control:has(.form-email:focus)::before {
    color: var(--primary-color);
}

/* Error States under Form Controls */
.control-error-wrapper .form-email {
    border-color: var(--danger-color);
}

.control-error-wrapper .form-email:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.control-error-wrapper::before {
    color: var(--danger-color);
}

.error-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--danger-light);
    color: #991b1b;
    border-left: 3px solid var(--danger-color);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.35rem;
    text-align: left;
}

/* Inline Form Error Alert */
.form-error-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background-color: var(--danger-light);
    color: #991b1b;
    border: 1.5px solid #fecaca;
    border-left: 4px solid var(--danger-color);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: left;
    animation: headShake 0.4s ease-in-out;
}

/* Terms and Conditions custom layout */
.control3 {
    display: flex;
    align-items: center;
    padding: 0.25rem 0 !important;
}

.checkbox-container {
    display: flex;
    align-items: center;
    user-select: none;
    cursor: pointer;
    position: relative;
}

.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background-color: var(--white);
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-right: 0.5rem;
    margin-top: 0;
}

.custom-checkbox::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7rem;
    color: var(--white);
    transform: scale(0);
    transition: var(--transition-smooth);
}

.custom-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.custom-checkbox:checked::before {
    transform: scale(1);
}

.checkbox-label {
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.m-blue7.remove {
    font-weight: 600;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.m-blue7.remove:hover {
    color: var(--primary-hover) !important;
    text-decoration: underline;
}

/* Step Buttons and CTA Layouts */
.step-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    width: 100%;
}

.button.button-cta {
    width: 100%;
    height: 3rem;
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.1);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

.button.button-cta:hover {
    background-color: var(--primary-hover) !important;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.2);
}

.button.btn-secondary {
    background-color: var(--white) !important;
    color: var(--text-secondary) !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: none !important;
}

.button.btn-secondary:hover {
    background-color: var(--bg-base) !important;
    color: var(--text-primary) !important;
    border-color: var(--text-muted) !important;
}

#login {
    text-align: center;
    margin-top: 1rem;
}

#login a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary) !important;
    text-decoration: none;
    transition: var(--transition-smooth);
}

#login a:hover {
    color: var(--primary-color) !important;
}

/* --------------------------------------------------------------------------
   Interactive Success State (Left Form Column)
   -------------------------------------------------------------------------- */
.success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem 0 1rem;
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.success-icon-wrapper {
    position: relative;
    width: 5rem;
    height: 5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-check-icon {
    font-size: 4.75rem;
    color: var(--success-color);
    position: relative;
    z-index: 5;
}

.success-icon-pulse {
    position: absolute;
    width: 4rem;
    height: 4rem;
    border-radius: var(--border-radius-full);
    background-color: rgba(16, 185, 129, 0.15);
    z-index: 1;
    animation: pulseRing 2s infinite ease-out;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.success-message {
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 320px;
}

/* Details subcard in success state */
.success-details-card {
    width: 100%;
    background: var(--bg-base);
    border-radius: var(--border-radius-md);
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.success-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-value.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #047857;
    background-color: #d1fae5;
    padding: 0.35rem 0.75rem;
    border-radius: var(--border-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}


/* --------------------------------------------------------------------------
   Right Column: Hero Banner Section (65% Width)
   -------------------------------------------------------------------------- */
.singup-wrapper .column.login-column.is-16.form-banner {
    width: 65% !important;
    height: 100%;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Backdrop glow elements */
.singup-wrapper .column.login-column.is-16.form-banner::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.form.signup-hero {
    position: relative;
    z-index: 2;
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.signup-hero .title.is-2 {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.signup-hero .title.is-2 .m-blue7 {
    color: #38bdf8 !important;
    /* Soft sky blue accent color */
}

.text-tarslate {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
}

.text-tarslate p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    font-weight: 400;
    max-width: 480px;
}

.text-tarslate img {
    max-width: 100%;
    height: auto;
    max-height: 38vh;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.25));
    transition: var(--transition-smooth);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.text-tarslate img:hover {
    transform: translateY(-6px);
}

/* Already have an account top header */
.already {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 100;
}

.already span {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.already .button.btn-align {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--white) !important;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-full);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.already .button.btn-align:hover {
    background: var(--white) !important;
    color: var(--primary-color) !important;
    border-color: var(--white);
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

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

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

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

@keyframes pulseRing {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    }

    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes headShake {
    0% {
        transform: translateX(0);
    }

    6.5% {
        transform: translateX(-6px) rotateY(-9deg);
    }

    18.5% {
        transform: translateX(5px) rotateY(7deg);
    }

    31.5% {
        transform: translateX(-3px) rotateY(-5deg);
    }

    43.5% {
        transform: translateX(2px) rotateY(3deg);
    }

    50% {
        transform: translateX(0);
    }
}


/* --------------------------------------------------------------------------
   Responsive Rules
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .singup-wrapper .column.is-4.bg-m-bg {
        width: 40% !important;
    }

    .singup-wrapper .column.login-column.is-16.form-banner {
        width: 60% !important;
        padding: 2.5rem;
    }

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

@media (max-width: 768px) {

    html,
    body {
        height: auto;
        overflow: auto;
    }

    .singup-wrapper {
        flex-direction: column-reverse;
        /* Stacks form above promotional banner on mobile */
        height: auto;
        overflow: visible;
    }

    .singup-wrapper .column.is-4.bg-m-bg {
        width: 100% !important;
        height: auto;
        overflow: visible;
        padding: 1.5rem 0;
    }

    .form-heading {
        padding: 2rem 1.5rem 0.5rem 1.5rem;
    }

    .form-body {
        padding: 0 1.5rem 2rem 1.5rem;
    }

    .singup-wrapper .column.login-column.is-16.form-banner {
        width: 100% !important;
        height: auto;
        padding: 3rem 1.5rem;
    }

    .signup-hero .title.is-2 {
        font-size: 2rem;
    }

    .text-tarslate p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .text-tarslate img {
        display: none;
        /* Hide marketing graphics on small phones to prioritize signup */
    }

    .already {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1.5rem;
        justify-content: center;
    }
}