/* Import required fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800&display=swap');

/* Import Roboto font from local files */
@font-face {
    font-family: 'Roboto';
    src: url('assets/fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Import Integral CF font from local files */
@font-face {
    font-family: 'Integral CF';
    src: url('assets/fonts/IntegralCF-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    descent-override: 25%;
}

@font-face {
    font-family: 'Integral CF';
    src: url('assets/fonts/IntegralCF-RegularOblique.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
    descent-override: 25%;
}

@font-face {
    font-family: 'Integral CF';
    src: url('assets/fonts/IntegralCF-ExtraBold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    descent-override: 25%;
}

@font-face {
    font-family: 'Integral CF';
    src: url('assets/fonts/IntegralCF-MediumOblique.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    descent-override: 25%;
}

/* RideApp color variables */
:root {
    --rideapp-black: #000000;
    --rideapp-dark: #20232D;
    --rideapp-white: #FFFFFF;
    --rideapp-gray-light: #CED3DF;
    --rideapp-gray: #888EA0;
}

/* ================================================================
   SECTION 1: GENERAL LAYOUT AND BACKGROUND
   ================================================================ */

/* Background modification - create two-column layout */
body {
    background-image: none;
    background-color: var(--rideapp-white);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Create left side with pseudo-element */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100vh;
    background-image: url('assets/images/background.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* RideApp logo on the left side */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    width: 40%;
    max-width: 500px;
    height: 200px;
    background-image: url('assets/images/logo.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(1.2) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.auth-app {
    max-width: 28rem;
    width: 100%;
    margin: 0 auto;
}

/* Main container - shifted to the right */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 1rem;
    background-color: var(--rideapp-white);
    margin-left: 50%;
    width: 50%;
    position: relative;
    z-index: 2;
}

/* ================================================================
   SECTION 2: MAIN CARD
   ================================================================ */

/* Transform card to match right section style */
.auth-card {
    background-color: var(--rideapp-white);
    backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    max-width: 500px;
    width: 100%;
}

.auth-card-body {
    padding: 0;
}

/* ================================================================
   SECTION 3: HEADER AND LOGO
   ================================================================ */

.auth-header {
    text-align: left;
    margin-bottom: 48px;
}

/* Hide IPONE logo (RideApp uses a different logo) */
.auth-logo {
    display: none;
}

/* Main title - RideApp style with Integral CF */
.auth-title {
    font-family: 'Integral CF', 'Barlow Condensed', sans-serif;
    font-weight: bold;
    font-size: 45px;
    line-height: 1.1;
    letter-spacing: 0;
    color: var(--rideapp-black);
    text-transform: uppercase;
    margin-bottom: 0;
    text-align: center;
}

/* Subtitle remains hidden (already in original CSS) */
.auth-subtitle {
    display: none;
}

/* ================================================================
   SECTION 4: FORM
   ================================================================ */

.auth-form {
    margin-top: 0;
}

.auth-form-group {
    margin-bottom: 26px;
}

/* ================================================================
   SECTION 5: LABELS
   ================================================================ */

.auth-label {
    display: block !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    color: var(--rideapp-black) !important;
    margin-bottom: 11px !important;
    padding-left: 22px !important;
    opacity: 1 !important;
}

/* ================================================================
   SECTION 6: INPUTS
   ================================================================ */

.auth-input {
    width: 100%;
    height: 50px;
    padding: 0 22px;
    border: none;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: var(--rideapp-dark);
    background: var(--rideapp-white);
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);
    margin-top: 0;
    transition: all 0.3s ease;
}

/* Placeholder */
.auth-input::placeholder {
    color: var(--rideapp-gray-light);
    opacity: 1;
    font-size: 14px;
}

/* Focus state */
.auth-input:focus {
    background: var(--rideapp-white);
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.25);
    border: none;
    outline: none;
    color: var(--rideapp-dark);
}

/* Autofill styling */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--rideapp-white) inset;
    -webkit-text-fill-color: var(--rideapp-dark);
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
}

/* ================================================================
   SECTION 7: MAIN BUTTON
   ================================================================ */

.auth-button {
    width: 100%;
    height: 56px;
    border: none;
    background-image: url('assets/images/button.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--rideapp-white);
    font-family: 'Integral CF', sans-serif;
    font-weight: normal;
    font-style: italic;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 36px;
    border-radius: 20px;
    transition: all 0.3s ease;
    padding: 0;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(95, 4, 183, 0.3);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================================================
   SECTION 8: LINKS
   ================================================================ */

.auth-link {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    color: var(--rideapp-gray);
    transition: color 0.2s ease;
}

.auth-link:hover,
.auth-forgot-link:hover {
    color: var(--rideapp-black);
    text-decoration: underline;
}

/* "Forgot password" link */
.auth-form-actions {
    order: 10;
    margin-top: 16px;
    text-align: right;
}

.auth-forgot-link {
    font-size: 14px;
    color: var(--rideapp-gray);
}

/* Form footer */
.auth-form-footer {
    margin-top: 24px;
    text-align: center;
}

/* ================================================================
   SECTION 9: DIVIDER (for registration page)
   ================================================================ */

.auth-divider {
    position: relative;
    text-align: center;
    margin: 32px 0;
}

.auth-divider-line {
    border-color: rgba(206, 211, 223, 0.5);
}

.auth-divider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--rideapp-white);
    padding: 0 16px;
    color: var(--rideapp-gray);
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

/* ================================================================
   SECTION 10: TEXTS AND MESSAGES
   ================================================================ */

.auth-text {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--rideapp-dark);
    text-align: center;
    margin-bottom: 24px;
}

/* ================================================================
   SECTION 11: ALERTS
   ================================================================ */

.auth-alert {
    margin-top: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
}

.auth-alert-danger {
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #C00000;
}

.auth-alert-success {
    background-color: rgba(54, 178, 24, 0.1);
    border: 1px solid rgba(54, 178, 24, 0.3);
    color: #2D8E17;
}

/* ================================================================
   SECTION 12: LOADING SPINNER
   ================================================================ */

.auth-loading {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.auth-spinner {
    border: 3px solid rgba(95, 4, 183, 0.2);
    border-top-color: #5F04B7;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* ================================================================
   SECTION 13: RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
    /* On tablet, reduce left section size */
    body::before {
        width: 40%;
    }
    
    body::after {
        left: 20%;
        width: 30%;
        height: 150px;
    }
    
    .auth-container {
        margin-left: 40%;
        width: 60%;
    }
}

@media (max-width: 768px) {
    /* On mobile, hide left side and center form */
    body::before,
    body::after {
        display: none;
    }
    
    .auth-container {
        margin-left: 0;
        width: 100%;
        padding: 40px 20px;
    }

    .auth-title {
        font-size: 36px;
        margin-bottom: 40px;
    }

    .auth-label {
        font-size: 18px;
    }

    .auth-input {
        height: 48px;
        font-size: 15px;
    }

    .auth-button {
        height: 56px;
        font-size: 20px;
        margin-top: 32px;
    }

    .auth-form-group {
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .auth-title {
        font-size: 32px;
    }

    .auth-label {
        font-size: 16px;
    }

    .auth-button {
        font-size: 18px;
        height: 50px;
    }
}

/* ================================================================
   SECTION 14: VIEW-SPECIFIC ADJUSTMENTS
   ================================================================ */

/* Login view */
.auth-card:has(form[name="loginForm"]) .auth-header {
    margin-bottom: 48px;
}

/* Registration view */
.auth-card:has(form[name="registerForm"]) .auth-form-group:first-of-type {
    margin-top: 0;
}

/* Forgot password view */
.auth-card:has(form[name="forgotPasswordForm"]) .auth-text {
    text-align: left;
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--rideapp-gray);
}

/* Password reset success view */
.auth-card:has(.auth-text) .auth-text {
    margin-top: 24px;
}
