/*
 * Call Center V2 — login page.
 * Standalone and self-contained: no Bootstrap, no theme, no icon font.
 * Direction-aware through logical properties, so one file serves LTR and RTL.
 * Colours, radii and type come from callcenter-v2-tokens.css (loaded first).
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

.cc-login {
    margin: 0;
    min-height: 100vh;
    font-family: var(--cc-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--cc-text);
    background: linear-gradient(120deg, var(--cc-bg) 0%, var(--cc-primary) 55%, #dfeee6 100%);
    -webkit-font-smoothing: antialiased;
}

/* ---------- background ---------- */

.cc-login__bg,
.cc-login__overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cc-login__bg {
    object-fit: cover;
    object-position: left center;
    z-index: 0;
}

.cc-login__overlay {
    z-index: 1;
    /* Physical direction on purpose: the artwork's green wave is on the left. */
    background:
        radial-gradient(ellipse 55% 45% at 18% 88%, rgba(4, 40, 25, .5) 0%, rgba(4, 40, 25, 0) 100%),
        linear-gradient(90deg, rgba(6, 60, 37, .78) 0%, rgba(8, 82, 50, .55) 38%, rgba(10, 90, 55, .12) 58%, rgba(255, 255, 255, .06) 100%);
}

/* ---------- layout ---------- */

.cc-login__shell {
    position: relative;
    z-index: 2;
    display: flex;
    /* The visual column stays on the left (over the green wave) in both
       directions; RTL flows right-to-left, hence the reversal there. */
    flex-direction: row;
    align-items: center;
    gap: clamp(32px, 5vw, 96px);
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px clamp(24px, 5vw, 80px);
}

[dir="rtl"] .cc-login__shell {
    flex-direction: row-reverse;
}

.cc-login__visual {
    flex: 1 1 auto;
    max-width: 640px;
    color: #fff;
}

.cc-login__panel {
    flex: 0 0 auto;
    width: min(100%, 540px);
    margin-inline-start: auto;
}

[dir="rtl"] .cc-login__panel {
    margin-inline-start: 0;
    margin-inline-end: auto;
}

/* ---------- visual column ---------- */

.cc-login__visual-logo {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    margin-bottom: 48px;
    background: rgba(255, 255, 255, .92);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.cc-login__visual-logo img {
    display: block;
    height: 56px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.cc-login__headline {
    margin: 0 0 20px;
    font-size: clamp(34px, 3.4vw, 52px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .18);
}

.cc-login__tagline {
    margin: 0 0 48px;
    max-width: 520px;
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.75;
    color: rgba(255, 255, 255, .88);
}

.cc-login__benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cc-login__benefits li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 128px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.cc-login__benefit-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border: 2px solid var(--cc-accent);
    border-radius: 50%;
    background: rgba(8, 60, 36, .55);
}

.cc-login__benefit-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: var(--cc-accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- card ---------- */

.cc-login__card {
    padding: 48px 56px 28px;
    background: var(--cc-surface);
    border-radius: var(--cc-radius-lg);
    box-shadow: 0 30px 70px rgba(10, 40, 25, .22), 0 2px 6px rgba(10, 40, 25, .06);
}

.cc-login__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.cc-login__logo img {
    display: block;
    height: 92px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.cc-login__title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    color: var(--cc-text);
}

.cc-login__subtitle {
    margin: 0 0 32px;
    text-align: center;
    font-size: 16px;
    color: var(--cc-muted);
}

/* ---------- alerts ---------- */

.cc-alert {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--cc-radius);
    font-size: 14px;
    text-align: start;
    background: var(--cc-info-soft);
    color: #1d4f91;
}

.cc-alert + .cc-alert {
    margin-top: -8px;
}

.cc-alert--error {
    background: var(--cc-danger-soft);
    color: var(--cc-danger);
}

.cc-alert--success {
    background: var(--cc-primary-soft);
    color: var(--cc-primary-dark);
}

.cc-alert--warning {
    background: var(--cc-warning-soft);
    color: #8a5a00;
}

/* ---------- fields ---------- */

.cc-field {
    margin-bottom: 22px;
}

.cc-field__label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--cc-text);
}

.cc-field__control {
    position: relative;
}

.cc-input {
    display: block;
    width: 100%;
    height: 60px;
    padding-block: 0;
    padding-inline: 52px 18px;
    font: inherit;
    font-size: 17px;
    color: var(--cc-text);
    background: #fff;
    border: 1.5px solid var(--cc-border);
    border-radius: var(--cc-radius);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

/* Emails and passwords read left-to-right in every locale. */
.cc-input[type="email"] {
    direction: ltr;
    text-align: start;
}

/* The field itself is LTR, so its logical padding would flip; the icon sits
   on the right in RTL, hence physical padding here. */
[dir="rtl"] .cc-input[type="email"] {
    text-align: right;
    padding-left: 18px;
    padding-right: 52px;
}

.cc-input--toggle {
    padding-inline-end: 56px;
}

.cc-input::placeholder {
    color: #a3acb7;
}

.cc-input:focus {
    border-color: var(--cc-primary);
    box-shadow: 0 0 0 4px rgba(15, 138, 76, .14);
}

.cc-field__icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 18px;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    fill: none;
    stroke: #66717e;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.cc-field__toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    transform: translateY(-50%);
    background: none;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.cc-field__toggle:hover,
.cc-field__toggle:focus-visible {
    background: #f1f4f6;
    outline: none;
}

.cc-eye {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #3a4552;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Password hidden → offer "show" (crossed eye, as in the reference). */
.cc-eye--show {
    display: none;
}

.cc-field__toggle.is-visible .cc-eye--show {
    display: block;
}

.cc-field__toggle.is-visible .cc-eye--hide {
    display: none;
}

/* ---------- remember / forgot ---------- */

.cc-login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 4px 0 28px;
}

.cc-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--cc-text);
    cursor: pointer;
    user-select: none;
}

.cc-check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.cc-check__box {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--cc-border);
    border-radius: 7px;
    background: #fff;
    transition: background .15s ease, border-color .15s ease;
}

.cc-check__box::after {
    content: "";
    width: 11px;
    height: 6px;
    margin-top: -2px;
    /* A tick is not mirrored in RTL, so physical borders on purpose. */
    border-left: 2.2px solid #fff;
    border-bottom: 2.2px solid #fff;
    transform: rotate(-45deg);
    opacity: 0;
}

.cc-check input:checked + .cc-check__box {
    background: var(--cc-primary);
    border-color: var(--cc-primary);
}

.cc-check input:checked + .cc-check__box::after {
    opacity: 1;
}

.cc-check input:focus-visible + .cc-check__box {
    box-shadow: 0 0 0 4px rgba(15, 138, 76, .18);
}

.cc-link {
    padding: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--cc-primary);
    background: none;
    border: 0;
    cursor: pointer;
}

.cc-link:hover,
.cc-link:focus-visible {
    color: var(--cc-primary-dark);
    text-decoration: underline;
    outline: none;
}

/* ---------- button ---------- */

.cc-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 60px;
    padding: 0 24px;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(180deg, #12975a 0%, var(--cc-primary) 100%);
    border: 0;
    border-radius: var(--cc-radius);
    box-shadow: 0 10px 22px rgba(15, 138, 76, .28);
    cursor: pointer;
    transition: filter .15s ease, transform .05s ease, box-shadow .15s ease;
}

.cc-btn:hover {
    filter: brightness(1.05);
    color: #fff;
}

.cc-btn:active {
    transform: translateY(1px);
}

.cc-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(15, 138, 76, .3);
}

.cc-btn__arrow {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[dir="rtl"] .cc-btn__arrow {
    transform: scaleX(-1);
}

.cc-btn__busy,
.cc-btn__spinner {
    display: none;
}

.cc-btn.is-busy {
    cursor: progress;
    filter: saturate(.85);
}

.cc-btn.is-busy .cc-btn__label,
.cc-btn.is-busy .cc-btn__arrow {
    display: none;
}

.cc-btn.is-busy .cc-btn__busy {
    display: inline;
}

.cc-btn.is-busy .cc-btn__spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cc-spin .7s linear infinite;
}

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

/* ---------- footer ---------- */

.cc-login__footer {
    margin: 28px 0 0;
    padding-top: 18px;
    text-align: center;
    font-size: 13px;
    color: #8b95a1;
    border-top: 1px solid #edf0f3;
}

/* ---------- forgot-password dialog ---------- */

.cc-dialog {
    width: min(92vw, 440px);
    padding: 40px 32px 32px;
    text-align: center;
    color: var(--cc-text);
    border: 0;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}

.cc-dialog::backdrop {
    background: rgba(8, 30, 20, .55);
}

.cc-dialog__close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f1f4f6;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.cc-dialog__close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #3a4552;
    stroke-width: 2;
    stroke-linecap: round;
}

.cc-dialog__art {
    width: 96px;
    height: auto;
    margin-bottom: 16px;
}

.cc-dialog h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.cc-dialog p {
    margin: 0 0 24px;
    color: var(--cc-muted);
}

/* ---------- responsive ---------- */

@media (max-width: 1279px) {
    .cc-login__panel {
        width: min(100%, 460px);
    }
    .cc-login__card {
        padding: 40px 36px 24px;
    }
    .cc-login__benefits {
        flex-wrap: nowrap;
        gap: 16px;
    }
    .cc-login__benefits li {
        width: 104px;
        font-size: 14px;
    }
    .cc-login__benefit-icon {
        width: 64px;
        height: 64px;
    }
    .cc-login__benefit-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* Short laptop screens (e.g. 1366×768): tighten vertical rhythm. */
@media (max-height: 820px) and (min-width: 992px) {
    .cc-login__shell {
        padding-block: 28px;
    }
    .cc-login__card {
        padding-block: 32px 20px;
    }
    .cc-login__logo {
        margin-bottom: 12px;
    }
    .cc-login__logo img {
        height: 72px;
    }
    .cc-login__subtitle {
        margin-bottom: 24px;
    }
    .cc-input,
    .cc-btn {
        height: 54px;
    }
    .cc-field {
        margin-bottom: 18px;
    }
    .cc-login__row {
        margin-bottom: 22px;
    }
    .cc-login__visual-logo {
        margin-bottom: 32px;
    }
    .cc-login__tagline {
        margin-bottom: 32px;
    }
}

/* Tablet and below: the login card is the page. */
@media (max-width: 991px) {
    .cc-login__visual {
        display: none;
    }
    .cc-login__overlay {
        background: linear-gradient(160deg, rgba(6, 60, 37, .82) 0%, rgba(10, 90, 55, .55) 100%);
    }
    .cc-login__shell,
    [dir="rtl"] .cc-login__shell {
        justify-content: center;
        padding: 32px 20px;
    }
    .cc-login__panel,
    [dir="rtl"] .cc-login__panel {
        margin: 0 auto;
    }
}

@media (max-width: 575px) {
    .cc-login__shell,
    [dir="rtl"] .cc-login__shell {
        align-items: flex-start;
        padding: 20px 14px;
    }
    .cc-login__card {
        padding: 28px 22px 18px;
        border-radius: 20px;
    }
    .cc-login__logo img {
        height: 68px;
    }
    .cc-login__title {
        font-size: 24px;
    }
    .cc-login__subtitle {
        margin-bottom: 24px;
        font-size: 15px;
    }
    .cc-input,
    .cc-btn {
        height: 54px;
    }
    .cc-input {
        font-size: 16px; /* ≥16px stops iOS zooming into the field */
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-btn.is-busy .cc-btn__spinner {
        animation-duration: 2s;
    }
}
