﻿/* ========================================================
   E-INSURE AuthServer — matching main app theme
   Primary brand: #9b3165
   ======================================================== */

:root {
    --einsure-primary: #1e51a4;
    --einsure-primary-dark: #143d7c;
    --einsure-primary-light: #3a75cf;
    --einsure-secondary: #e9d800;
    --bs-primary: #1e51a4;
    --bs-primary-rgb: 30, 81, 164;
    --bs-link-color: #1e51a4;
    --bs-link-hover-color: #143d7c;
}

/* ---- Hide ABP logo ---- */
:root .lpx-brand-logo {
    --lpx-logo: none;
    --lpx-logo-icon: none;
}
.lpx-brand-logo,
.navbar-brand img,
img[src*="abp"],
img[src*="logo"] {
    display: none !important;
}

/* ---- Hide ABP basic-theme navbar — replaced by injected .einsure-portal-header ---- */
body.has-einsure-portal-header .navbar,
body.has-einsure-portal-header header.navbar,
body.has-einsure-portal-header .lpx-topbar {
    display: none !important;
}

/* ---- einsure portal header (injected by einsure-header.js) ---- */
.einsure-portal-header {
    background-color: var(--einsure-primary) !important;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: none !important;
}

.einsure-portal-header .header-left,
.einsure-portal-header .header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.einsure-portal-header .header-right {
    justify-content: flex-end;
}

.einsure-portal-header .header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.einsure-portal-header .header-logo {
    height: 48px;
    transition: transform 0.3s ease;
}

.einsure-portal-header .logo-link:hover .header-logo {
    transform: scale(1.05);
}

/* ---- "Sigurohu" CTA button in the header ---- */
.einsure-portal-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.einsure-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.02em;
    background-color: var(--einsure-secondary);
    color: var(--einsure-primary) !important;
    border: 1px solid var(--einsure-secondary);
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.einsure-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.einsure-cta-btn i {
    font-size: 15px;
}

/* ---- Eurosig external link in the header ---- */
.einsure-external-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #fff !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.einsure-external-link:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.3);
}

.einsure-external-link i {
    font-size: 18px;
}

/* ---- Language switcher in the header ---- */
.einsure-lang-switch {
    position: relative;
}

.einsure-lang-switch .lang-caret {
    font-size: 11px !important;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.einsure-lang-switch.open .lang-caret {
    transform: rotate(180deg);
}

.einsure-lang-switch .lang-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    list-style: none;
}

.einsure-lang-switch .lang-dropdown-menu.show {
    display: block;
}

.einsure-lang-switch .lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.04em;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.einsure-lang-switch .lang-btn i.fa-globe {
    font-size: 18px;
}

.einsure-lang-switch .lang-btn:hover,
.einsure-lang-switch .lang-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.3);
}

.lang-dropdown-menu {
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    margin-top: 10px !important;
    padding: 8px;
    min-width: 200px;
    z-index: 2000;
}

.lang-dropdown-menu .dropdown-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.lang-dropdown-menu .dropdown-item .lang-code {
    min-width: 28px;
    font-weight: 800;
    color: var(--einsure-primary);
    letter-spacing: 0.04em;
}

.lang-dropdown-menu .dropdown-item .lang-name {
    color: #1f2937;
}

.lang-dropdown-menu .dropdown-item.active,
.lang-dropdown-menu .dropdown-item.active .lang-code,
.lang-dropdown-menu .dropdown-item.active .lang-name {
    background-color: rgba(30, 81, 164, 0.08);
    color: var(--einsure-primary) !important;
}

/* ---- Navbar header — brand color (fallback if not replaced) ---- */
.navbar,
header.navbar,
.lpx-topbar {
    background-color: var(--einsure-primary) !important;
    border-bottom: none !important;
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar > .container > a,
.navbar > .container > span,
.navbar > .container-fluid > a,
.navbar > .container-fluid > span,
.navbar .bi {
    color: #fff !important;
}

/* Dropdown menu items inside navbar — dark text on white background */
.navbar .dropdown-menu a,
.navbar .dropdown-menu .dropdown-item,
.navbar .dropdown-menu span {
    color: #18181b !important;
}
.navbar .dropdown-menu .dropdown-item:hover {
    background-color: rgba(30, 81, 164, 0.08) !important;
    color: #18181b !important;
}
.navbar .dropdown-menu .dropdown-item.active,
.navbar .dropdown-menu .dropdown-item:active {
    background-color: #1e51a4 !important;
    color: #fff !important;
}

/* ---- Account page branding ---- */
.account-brand h1,
.account-brand .navbar-brand {
    color: var(--einsure-primary) !important;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 2rem;
}

/* ---- Primary buttons ---- */
.btn-primary,
[abp-button="Primary"],
.abp-btn-primary {
    background-color: var(--einsure-primary) !important;
    border-color: var(--einsure-primary) !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--einsure-primary-dark) !important;
    border-color: var(--einsure-primary-dark) !important;
}

.btn-outline-primary,
[abp-button="Outline_Primary"] {
    color: var(--einsure-primary) !important;
    border-color: var(--einsure-primary) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--einsure-primary) !important;
    border-color: var(--einsure-primary) !important;
    color: #fff !important;
}

/* ---- Links ---- */
a {
    color: var(--einsure-primary);
}
a:hover {
    color: var(--einsure-primary-dark);
}

/* ---- Form focus states ---- */
.form-control:focus,
.form-select:focus {
    border-color: var(--einsure-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(155, 49, 101, 0.15) !important;
}

/* ---- Login page card styling ---- */
.account-column .card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ---- ABP Account login form overrides ---- */
.account-module-form .btn-primary,
.login-form .btn-primary,
form .btn-primary {
    background-color: var(--einsure-primary) !important;
    border-color: var(--einsure-primary) !important;
}

/* ---- Spinner ---- */
.spinner-border {
    color: var(--einsure-primary);
}

/* ---- Page background ---- */
html, body {
    min-height: 100vh;
}

body {
    background-color: #fafaf9;
}

/* ---- Footer link colors ---- */
.text-primary {
    color: var(--einsure-primary) !important;
}

/* ---- Hide tenant switch everywhere ---- */
.tenant-switch-area,
[id*="TenantSwitch"],
[id*="tenant-switch"],
[id*="Tenant"],
.abp-tenant-switch,
a[href*="TenantSwitch"],
a[href*="tenant"],
.card-body > div:has(a[href*="TenantSwitch"]),
/* ABP Account login page tenant section */
.account-module-form .mb-3:has(a[href*="Tenant"]),
.text-muted:has(a[href*="Tenant"]),
div:has(> a[href*="Tenant"]),
.abp-multi-tenancy-side,
[class*="tenant"],
[class*="Tenant"],
/* The "Not selected" / tenant name row above the login form */
.card-body > .mb-4:first-child:has(a),
.card-body > p:has(a[href*="Tenant"]),
.card-body > div.text-center:has(a[href*="Tenant"]),
.card-body > .mb-3:has(small),
.card-body .text-muted small:has(a) {
    display: none !important;
}

/* ---- Hide ABP logo and brand title on login page ---- */
.brand-container,
.account-brand img,
.account-brand .navbar-brand,
.account-brand a:has(img) {
    display: none !important;
}

/* ---- "Jeni përdorues i ri? Regjistrohuni" prompt (moved below the Hyr button) ---- */
.einsure-register-prompt {
    display: block;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-weight: 500;
    color: #64748b;
}

.einsure-register-prompt a {
    margin-left: 4px;
    font-weight: 600;
}

/* ---- Login form card ---- */
.account-module-form,
.login-page .card {
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ---- Wider login form ---- */
.col.mx-auto[style*="max-width: 440px"],
.col.mx-auto.account-column {
    max-width: 540px !important;
}

/* ---- Icons for login form labels ---- */
label[for="LoginInput_UserNameOrEmailAddress"]::before {
    content: "\f007";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    margin-right: 6px;
    color: var(--einsure-primary);
}
label[for="LoginInput_Password"]::before {
    content: "\f023";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    margin-right: 6px;
    color: var(--einsure-primary);
}
label[for="LoginInput_RememberMe"]::before {
    content: "\f058";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 400;
    margin-right: 6px;
    color: var(--einsure-primary);
}

/* ---- Login button icon ---- */
.card-body .btn-primary[value="Login"]::before,
.card-body .btn-primary[type="submit"]::before {
    content: "\f2f6";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    margin-right: 8px;
}

/* ---- Forgot password link icon ---- */
a:not(.btn):not([href*="returnUrl"])[href*="ForgotPassword"]::before {
    content: "\f059";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 400;
    margin-right: 4px;
}

/* ---- Footer ---- */
.einsure-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 0;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.einsure-footer .footer-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

