﻿/* Login Page Styles - Include CSS Variables */
:root {
    /* primära färger */
    --color-graphite: #3A3531;
    --color-hortensia: #58768F;
    --color-silvergran: #3B564D;
    --color-tall: #A27C53;
    --color-lonn: #83262C;
    --color-mullbar: #50202D;
    /* Secondära färger */
    --color-bjornbar: #AF7C96;
    --color-havtorn: #DB7B66;
    --color-blabar: #9BB4CD;
    --color-vinbar: #D7C1A7;
    --color-krusbar: #838E6D;
    /* support färger */
    --color-text: var(--color-graphite);
    --color-text-light: white;
    --color-accent-primary: var(--color-hortensia);
    --color-accent-success: var(--color-silvergran);
    --color-accent-warn: var(--color-lonn);
    --color-surface: #ffffff;
    --color-muted: var(--color-vinbar);
    --color-light-gray: #f8f9fa;
    --color-border: #e9ecef;
    --color-button-green: #68867C;
    --color-button-green-hover: #34433E;

    /* Typsnitt */
    --font-heading: 'Crimson Text', serif;
    --font-ui: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    /* Border */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-null: 0;
    /* Skuggor */
    --shadow-sm: 0 1px 2px 0 rgba(58, 53, 49, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(58, 53, 49, 0.1), 0 2px 4px -1px rgba(58, 53, 49, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(58, 53, 49, 0.1), 0 4px 6px -2px rgba(58, 53, 49, 0.05);
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-surface);
}

/*.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-light-gray) 0%, #f8f9fa 100%);
    padding: var(--space-lg);
}

.login-card {
    background-color: var(--color-silvergran);
    border-radius: var(--radius-null);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .login-card::before {*/
        /*content: '';*/
        /*position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--color-accent-primary), var(--color-mullbar));
    }

.login-logo {
    width: 120px;
    height: auto;
    margin: 0 auto var(--space-2xl) auto;
    display: block;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin: 0 0 var(--space-2xl) 0;
    line-height: 1.2;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-null);
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .form-input:focus {
        outline: none;
        border-color: var(--color-accent-primary);
        box-shadow: 0 0 0 3px rgba(88, 118, 143, 0.1);
    }

.password-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.password-eye-toggle {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: var(--space-xs);
    border-radius: var(--radius-null);
    opacity: 0.6;
}

    .password-eye-toggle:hover {
        opacity: 1;
        background-color: var(--color-light-gray);
    }

.eye-icon {
    font-size: 1.25rem;
    display: block;
}

.login-button {
    width: 100%;
    background: var(--color-button-green);
    color: var(--color-surface);
    border: none;
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-null);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

    .login-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .login-button:hover::before {
        left: 100%;
    }

    .login-button:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        background: var(--color-button-green-hover);
    }

    .login-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
    }

.error-message {
    background-color: rgba(131, 38, 44, 0.1);
    color: var(--color-accent-warn);
    padding: var(--space-md);
    border-radius: var(--radius-null);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: var(--space-md);
    border-left: 4px solid var(--color-accent-warn);
}

.success-message {
    background-color: rgba(59, 86, 77, 0.1);
    color: var(--color-accent-success);
    padding: var(--space-md);
    border-radius: var(--radius-null);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: var(--space-md);
    border-left: 4px solid var(--color-accent-success);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--color-surface);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}*/

/* First Login specific styles */
/*.first-login-subtitle {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--color-text);
    opacity: 0.8;
    margin: 0 0 var(--space-2xl) 0;
    line-height: 1.5;
}*/

/* Responsive design */
/*@media (max-width: 480px) {
    .login-container {
        padding: var(--space-md);
    }

    .login-card {
        padding: var(--space-2xl);
    }

    .login-title {
        font-size: 1.75rem;
    }

    .login-logo {
        width: 100px;
    }
}*/

/* End of CustomerPortal.Blazor/wwwroot/css/login.css */
.login-page {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    min-height: 100vh;
    margin: 38px;
}

/* LEFT SIDE */
.login-image {
    width: 100%;
    height: 100vh;
    
    position: relative;
    overflow: hidden;

}
    .login-image::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.5); /* darkness level */
        z-index: 1;
    }


.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 80%; /* focus */
    transform: scale(1.2); /* zoom */
}


.brand-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    margin: 10px;
    width: 400px;
    
}

.brand-subtitle {
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-transform: uppercase;
}


.login-panel {
    background-color: var(--color-silvergran);
    padding: 80px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center
    
}

.login-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: white;
    margin-bottom: 48px;
    max-width: 410px;
    
    align-items: center;
    text-align:center;
}
    .login-title:focus-visible {
        outline: none;
    }
#423E3A
#59595A

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin: 16px 0 32px;
}

    .login-options a {
        color: rgba(255,255,255,0.8);
        text-decoration: underline;
    }


/* === FORM BASICS === */
.login-form {
    width: 100%;
    max-width: 410px;
    
    align-content: center;
}

.form-group {
    margin-bottom: 28px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    /*color: rgba(255, 255, 255, 0.85);*/
}
.form-label-text-light {
    color: var(--color-surface);
    
}

/* Inputs: underline style like screenshot */
/*.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    padding: 10px 0 12px;
    font-size: 1rem;
    color: white;
    outline: none;
    box-sizing: border-box;
}*/
/* Inputs: underline style (NO white box) */

input.form-input:-webkit-autofill,
input.form-input:-webkit-autofill:hover,
input.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 9999s ease-in-out 0s;
}
.form-input {
    width: 100%;
    background-color: transparent !important;
    border: 0;
    border-bottom: 2px solid var(--color-surface);
    padding: 10px 0 12px;
    font-size: 1rem;
    color: white;
    outline: none;
    box-sizing: border-box;
    /* Kill browser styles */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    .form-input::placeholder {
        color: rgba(255, 255, 255, 0.55);
    }

    .form-input:focus {
        border-bottom-color: rgba(255, 255, 255, 0.9);
    }

/* === OPTIONS ROW === */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 34px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

    .login-options label {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        user-select: none;
    }

    /* Checkbox */
    .login-options input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: rgba(255, 255, 255, 0.9);
    }

    /* Forgot password link */
    .login-options a {
        color: rgba(255, 255, 255, 0.75);
        text-decoration: underline;
        text-underline-offset: 3px;
        transition: opacity 0.2s ease;
    }

        .login-options a:hover {
            opacity: 1;
            color: rgba(255, 255, 255, 0.95);
        }
.login-button {
    width: 100%;
    background: var(--color-button-green);
    color: var(--color-surface);
    border: none;
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-null);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

    .login-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .login-button:hover::before {
        left: 100%;
    }

    .login-button:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        background: var(--color-button-green-hover);
    }

    .login-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
    }

/* === PASSWORD FIELD WITH EYE ICON === */
.password-input-wrapper {
    position: relative;
}

    .password-input-wrapper .form-input {
        padding-right: 40px; /* space for eye */
    }

.password-eye-toggle {
    position: absolute;
    right: 0;
    bottom: 8px; /* aligns with underline */
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

    .password-eye-toggle:hover {
        color: rgba(255, 255, 255, 1);
    }

.error-message {
    margin-top: 20px;
    padding: 12px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 200, 200, 0.95);
    background: rgba(255, 80, 80, 0.08);
    border-left: 2px solid rgba(255, 120, 120, 0.6);
}




@media (max-width: 900px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-image {
        display: none;
    }

    .login-panel {
        padding: 48px 32px;
    }
}
