/* CSS Variables for dark theme (matching style.css) */
:root[data-theme='dark'] {
    --bgColor: #0C0D0F;
    --bgColor2: #0F1C25;
    --bgColor3: #1C2934;
    --menu: #0B1117;
    --topHover: #EBECE8;
    --info_text: #CDCDCD;
    --info_text2: #E1E1E1;
    --greyed_out_text: #9F9F9F;
    --accent_border: #87B4D833;
    --accent_bg2: #d3ebf7;
    --hover_brightness: brightness(1.2);
}

/* Gotham Bold Font */
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bgColor);
    color: var(--topHover);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Main container - two column layout */
.login-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

.login-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 70%;
    transform: translateX(-1px);
    width: 2px;
    background: linear-gradient(180deg, #04b9e900 0%, #5B728D 50%, #04b9e900 100%);
    opacity: 1;
    pointer-events: none;
}

/* Left side - Login form (2/3 width) */
.login-form-section {
    flex: 0 0 70%;
    max-width: 70%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 250px;
    background-color: var(--menu);
    position: relative;
    z-index: 1;
}

/* Logo section */
.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
}

.logo-image {
    height: 40px;
    width: auto;
}

/* Title */
.login-title {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 33.92px;
    font-weight: 600;
    font-style: normal;
    color: var(--topHover);
    margin-bottom: 48px;
    line-height: 100%;
    letter-spacing: -0.5px;
    /* leading-trim: none; // Not yet widely supported */
}

/* Form styling */
.login-form {
    max-width: 400px;
}

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

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--info_text);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--accent_bg2);
    outline: none;
}

.password-toggle-icon {
    position: relative;
    font-size: 18px;
    line-height: 1;
}

.password-toggle-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 16px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(40deg);
    border-radius: 1px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.password-toggle-icon.is-visible::after {
    opacity: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--info_text);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--bgColor2);
    border: 1.06px solid var(--accent_border);
    border-radius: 8px;
    color: var(--topHover);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px var(--bgColor2) inset;
    box-shadow: 0 0 0px 1000px var(--bgColor2) inset;
    -webkit-text-fill-color: var(--topHover);
    caret-color: var(--topHover);
    border: 1.06px solid var(--accent_border);
    transition: background-color 5000s ease-in-out 0s;
}

.form-input:-moz-autofill {
    box-shadow: 0 0 0px 1000px var(--bgColor2) inset;
    -moz-text-fill-color: var(--topHover);
    caret-color: var(--topHover);
    border: 1.06px solid var(--accent_border);
}

.form-input:focus {
    border-color: var(--accent_bg2);
    box-shadow: 0 0 0 3px rgba(211, 235, 247, 0.08);
}

.form-input::placeholder {
    color: var(--greyed_out_text);
}

/* Outline button class (from style.css) */
.outline_btn {
    color: var(--accent_bg2) !important;
    border: 1px solid var(--accent_border) !important;
    background-color: transparent !important;
}

.outline_btn:disabled {
    opacity: 0.3 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.outline_btn:hover {
    filter: brightness(1.2) !important;
}

/* Sign in button - using outline_btn class from style.css */
.signin-button-wrapper {
    width: 100%;
    margin-top: 32px;
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.signin-button {
    flex: 1;
    padding: 12px 8px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 45%;
    max-width: 50%;
    cursor: pointer;
}

.signin-button-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.signin-button:hover .signin-button-arrow {
    transform: translate(2px, -2px);
}

/* Google Sign in button - same width as Sign in button */
.signin-button-google {
    width: 50%;
    max-width: 60%;
    margin-top: 16px;
    padding: 12px 8px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.signin-button-google:hover {
    filter: brightness(1.2) !important;
}

.signin-button-google .fa-google {
    transition: transform 0.3s ease;
}

.signin-button-google:hover .fa-google {
    transform: scale(1.15);
}

/* Login button icon animation */
#loginButton i {
    transition: transform 0.2s ease;
    display: inline-block;
}

#loginButton:hover i {
    transform: scale(1.2);
}

/* Right side - Decorative pattern (1/3 width) */
.decorative-section {
    flex: 0 0 30%;
    max-width: 30%;
    background-color: var(--bgColor);
    position: relative;
    overflow: hidden;
}

.pattern-container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 40px;
    overflow: hidden;
}

/* Circle design pattern image (SVG) */
.circle-design-image {
    width: 100%;
    max-width: 50vw;
    height: 90vh;
    object-fit: contain;
    object-position: center;
    opacity: 0.8;
    transform: translateX(12%);
}

/* Desktop/Tablet image - visible by default */
.circle-design-desktop {
    display: block;
}

/* Mobile image - hidden by default on desktop/tablet */
.circle-design-mobile {
    display: none !important;
    visibility: hidden !important;
}

/* SVG specific styling for better rendering */
.logo-image,
.circle-design-image {
    display: block;
}

/* Fallback if image doesn't load - show gradient */
.pattern-container::before {
    display: none;
}

/* Mobile separator line */
.mobile-separator {
    display: none;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #04b9e900 0%, #5B728D 50%, #04b9e900 100%);
    margin: 0;
    padding: 0;
    border: none;
}

/* Error states (for future integration) */
.form-input.error {
    border-color: #d9534f;
}

.error-message {
    color: #d9534f;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-input.error + .error-message {
    display: block;
}

/* Responsive design */

/* Desktop: > 1024px - ensure mobile image is hidden */
@media (min-width: 1025px) {
    .circle-design-mobile {
        display: none !important;
    }

    .circle-design-desktop {
        display: block;
    }
}

/* Tablet: 768px - 1024px (60/40 split) */
@media (min-width: 768px) and (max-width: 1024px) {
    .login-container::after {
        left: 60%;
    }

    .login-form-section {
        flex: 0 0 60%;
        max-width: 60%;
        padding: 50px 100px;
    }

    .decorative-section {
        flex: 0 0 40%;
        max-width: 40%;
    }

    /* Ensure mobile image is hidden on tablet */
    .circle-design-mobile {
        display: none !important;
    }

    .circle-design-desktop {
        display: block;
    }
}

/* Mobile: < 768px (stacked layout) */
@media (max-width: 767px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .login-container {
        flex-direction: column;
        position: relative;
        height: auto;
        min-height: 100vh;
    }

    .login-container::after {
        display: none;
    }

    /* Show mobile separator */
    .mobile-separator {
        display: block;
        order: 2;
    }

    /* Decorative section on top */
    .decorative-section {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        height: 30vh;
        min-height: 200px;
        display: block;
        order: 1;
    }

    .pattern-container {
        position: relative;
        height: 100%;
        padding-left: 0;
        align-items: flex-start;
        padding-top: 0px;
    }

    .circle-design-image {
        width: 100%;
        max-width: 100%;
        height: 70%;
        object-fit: contain;
        object-position: center;
        transform: translateX(0) translateY(0);
        opacity: 0.8;
    }

    /* Show mobile image, hide desktop image on mobile */
    .circle-design-desktop {
        display: none !important;
        visibility: hidden !important;
    }

    .circle-design-mobile {
        display: block !important;
        visibility: visible !important;
    }

    /* Form section below separator */
    .login-form-section {
        order: 3;
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
        padding: 40px 24px;
        justify-content: flex-start;
    }

    .logo-container {
        display: none;
    }

    .logo-image {
        display: none;
    }

    .login-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .login-form {
        max-width: 100%;
    }

    /* Full width button on mobile */
    .signin-button-wrapper {
        width: 100%;
        margin-top: 32px;
        flex-direction: row;
    }

    .signin-button {
        width: 100%;
        min-height: 44px;
        padding: 16px 24px;
    }
}

