/* Login Refresh Styles - Feature Flag: tx.ui_refresh */

/* Apply Mailchimp theme to login page */
.login-refresh {
    background-color: var(--color-container-background-complementary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Ensure theme is applied */
.login-refresh[data-theme="mailchimp"] {
    /* Theme variables are already defined in _ids-tokens.scss */
}

/* Override #content padding-left from page-layout when feature flag is enabled */
.login-refresh #content {
    padding-left: 0 !important;
}

/* Branding stripe on the left */
.login-refresh__branding {
    position: fixed;
    left: 0;
    top: 0;
    width: calc(var(--base-unit) * 2);
    height: 100vh;
    background-color: var(--color-action-special-use);
    z-index: 1;
}

/* Freddie logo in branding area */
.login-refresh__freddie {
    position: absolute;
    left: calc(var(--base-unit) * 5);
    top: calc(var(--base-unit) * 2.75);
    width: calc(var(--base-unit) * 9.5);
    height: calc(var(--base-unit) * 9.5);
}

.login-refresh__freddie img {
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1); /* Make the SVG white */
}

/* Main content area */
.login-refresh__content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 0 var(--space-container-padding-large);
    margin-left: calc(var(--base-unit) * 2); /* Account for branding stripe */
    margin-bottom: 200px;
}

/* Login card */
.login-refresh__card {
    background-color: var(--color-shadow);
    border: 1px solid var(--color-container-border-complementary);
    border-radius: var(--radius-large);
    padding: var(--space-container-padding-x-large);
    width: calc(var(--base-unit) * 92);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-column-gap-x-large);
}

/* Card header section */
.login-refresh__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-row-gap-large);
    width: 100%;
}

/* Mandrill logo */
.login-refresh__logo {
    width: calc(var(--base-unit) * 30);
    height: calc(var(--base-unit) * 16.25);
    background-image: url('/img/login-logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Login title */
.login-refresh__title {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-heading);
    font-size: var(--font-size-heading-3);
    line-height: var(--line-height-heading);
    letter-spacing: -0.02em;
    color: var(--color-text-inverse);
    text-align: center;
    margin: 0;
}

/* Card content section */
.login-refresh__content-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-component-gap-medium);
    width: 100%;
}

/* Content heading */
.login-refresh__content-heading {
    font-family: var(--font-family-body);
    font-weight: var(--font-weight-heading);
    font-size: var(--font-size-action-small);
    line-height: var(--line-height-body);
    letter-spacing: -0.01em;
    color: var(--color-text-inverse);
    margin: 0;
}

/* Content description */
.login-refresh__content-description {
    font-family: var(--font-family-body);
    font-weight: var(--font-weight-body);
    font-size: var(--font-size-action-x-small);
    line-height: var(--line-height-body);
    color: var(--color-text-inverse);
    margin: 0;
}

.login-refresh__content-description a {
    color: var(--color-text-inverse);
    text-decoration: none;
}

.login-refresh__content-description a:hover {
    text-decoration: underline;
}

/* Login button */
.login-refresh__button {
    background-color: var(--color-action-standard);
    border: none;
    border-radius: var(--radius-action);
    color: var(--color-text-inverse);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-component-gap-small);
    padding: var(--space-component-inline-padding-small) var(--space-component-inline-padding-x-large);
    width: 100%;
    font-family: var(--font-family-component);
    font-weight: var(--font-weight-component);
    font-size: var(--font-size-action-small);
    line-height: var(--line-height-component);
    text-decoration: none;
    transition: background-color var(--duration-fade-fast) var(--ease-fade);
}

.login-refresh__button:hover {
    background-color: var(--color-action-standard-hover);
    color: var(--color-text-inverse);
    text-decoration: none;
}

.login-refresh__button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-focus-indicator);
}

/* Footer legalese */
.login-refresh__footer {
    position: fixed;
    bottom: calc(var(--base-unit) * 3);
    left: var(--space-container-padding-large);
    color: var(--color-text-inverse);
    font-family: var(--font-family-body);
    font-weight: var(--font-weight-body);
    font-size: var(--font-size-action-x-small);
    line-height: var(--line-height-body);
    z-index: 2;
}

.login-refresh__footer a {
    color: var(--color-text-inverse);
    text-decoration: none;
}

.login-refresh__footer a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .login-refresh__content {
        padding: 0 var(--space-container-padding-medium);
        margin-left: 0; /* Remove margin on mobile */
    }
    
    .login-refresh__card {
        width: 100%;
        max-width: calc(var(--base-unit) * 80);
        padding: var(--space-container-padding-large) var(--space-container-padding-medium);
    }
    
    .login-refresh__title {
        font-size: var(--font-size-heading-4);
    }
    
    .login-refresh__logo {
        width: calc(var(--base-unit) * 25);
        height: calc(var(--base-unit) * 13.5);
    }
    
    .login-refresh__branding {
        display: none; /* Hide branding on mobile */
    }
}

/* High DPI display support */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .login-refresh__logo {
        background-image: url('/img/login-logo@2x.png');
    }
}
