﻿:root {
    --login-page-primary: var(--cp-primary-400);
}

html {
    position: relative;
    min-height: 100%;
}

body {
    min-height: 100vh;
}

/* ===== Layout elements used by LoginLayout ===== */
.legal {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    justify-content: right;
    color: var(--cp-text);
    font-weight: bold;
}

    .legal > * {
        cursor: pointer;
    }

.footer-wrapper {
    width: 100%;
    position: absolute;
    bottom: 4px;
    padding: 0 12px;
}

#legal-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(52, 64, 84, 0.70);
    /* Background blur/md */
    backdrop-filter: blur(8px);
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    z-index: 9999;
}

#legal-dialog {
    position: absolute;
    width: 80%;
    max-width: 600px;
    height: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 24px;
    border-radius: 12px;
    background: var(--Base-White, #FFF);
    box-shadow: 0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03);
    outline: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    z-index: 9999;
}

    #legal-dialog img {
        width: 24px;
        height: 24px;
    }

.version {
    color: var(--cp-text-50);
}

/* ===== Buttons ===== */
.login-button {
    width: 100% !important;
    height: 48px;
    border: 0;
    border-radius: 2px !important;
    text-decoration: none;
}

.login-button--primary {
    background: var(--login-page-primary) !important;
}

    .login-button--primary:hover,
    .login-button--primary:active,
    .login-button--primary:focus,
    .login-button--primary:disabled {
        background: var(--login-page-primary) !important;
    }

.login-button--secondary {
    background: white !important;
    color: var(--cp-text-700) !important;
    border: 1px solid #B5B7BD;
}

/* ===== Page grid ===== */
.cp-login-page {
    min-height: 100vh;
    height: 100vh;
    max-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    background: #ffffff;
    font-family: 'Inter';
    overflow: hidden;
}

/* ===== Left panel ===== */
.cp-login-left {
    background: #0b5b63; /* teal */
    color: #ffffff;
    display: flex;
    align-items: center;
    overflow: hidden;
    max-height: 100vh;
}

.cp-login-left-inner {
    width: 100%;
    padding: 56px 64px 56px 64px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    /*gap: 56px;*/
    min-height: 100vh;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.cp-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-login-logo {
    height: 50px;
    width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-login-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    overflow: hidden;
    width: 100%;
    height: 100%;
    max-width: 100%;
}

.cp-login-hero-img {
    /*max-width: 520px;*/
    /*width: 60%;*/
    position: absolute;
    height: 100%;
    padding: 56px 56px;
    max-width: 100%;
    z-index: 0;
    /*display: block;*/
}

.cp-carousel-background-1 {
    position: absolute;
    height: 100%;
    max-width: 100%;
    z-index: 1;
}

.cp-carousel-background-2 {
    position: absolute;
    height: 70%;
    max-width: 70%;
    z-index: 2;
}

.cp-login-left-footer {
    text-align: center;
    margin: 0 auto;
    height: max-content;
}

.cp-login-left-title {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 700;
}

.cp-login-left-subtitle {
    margin: 0;
    opacity: 0.85;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== Right panel ===== */
.cp-login-right {
    display: grid;
    place-items: center;
    /*padding: 56px 24px;*/
    margin: 56px 24px;
    overflow-y: auto;
    max-height: 100vh;
}

.cp-login-card {
    width: min(380px, 90vw);
}

.cp-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.cp-login-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-style: normal;
    font-weight: 600;
    color: #27272E;
    line-height: 38px;
}

.cp-login-tagline {
    font-family: 'Inter';
    font-feature-settings: 'salt' on;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    color: #718096;
    line-height: 26px;
}

/* top banner error */
.cp-login-error {
    margin: 0 0 12px;
    color: #b42318;
    font-size: 13px;
}

/* ===== Form ===== */
.cp-login-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.cp-login-field-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.cp-login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    margin-bottom: 18px;
}

.cp-login-label {
    color: #425466;
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.cp-login-input,
.cp-login-select {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 1px 2px 0 rgba(50, 50, 71, 0.08), 0 0 1px 0 rgba(50, 50, 71, 0.20);
    padding: 0 14px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    color: #111827;
}

.cp-select-wrap {
    position: relative;
    width: 100%;
}

/* hide native arrow + standardize appearance */
.cp-login-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px; /* space for chevron */
    cursor: pointer;
}

/* custom chevron */
.cp-select-wrap::after {
    content: "";
    position: absolute;
    right: 14px; /* controls how far from the right */
    top: 50%;
    width: 10px;
    height: 10px;
    transform: translateY(-50%) rotate(45deg);
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    pointer-events: none;
}

/* optional: hover/focus polish */
.cp-login-select:hover {
    border-color: #cbd5e1;
}

.cp-login-select:focus {
    border-color: #6bd3dd;
    box-shadow: 0 0 0 4px rgba(107, 211, 221, 0.25);
}

#externalProviderDropdown {
    margin-bottom: 22px;
}

.cp-login-input::placeholder {
    color: #9ca3af;
}

.cp-login-input:focus,
.cp-login-select:focus {
    border-color: #6bd3dd;
    box-shadow: 0 0 0 4px rgba(107, 211, 221, 0.25);
}

/* password eye */
.cp-login-input-with-icon {
    position: relative;
    width: 100%;
}

.cp-login-input-pad-right {
    padding-right: 44px;
}

.cp-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

    .cp-eye svg {
        display: block;
    }

    .cp-eye:focus {
        outline: none;
    }

    .cp-eye:focus-visible {
        outline: 2px solid rgba(0,0,0,0.2);
        border-radius: 8px;
    }

.cp-eye-icon {
    display: inline-flex;
}

.cp-eye-hide {
    display: none;
}

.cp-eye.is-on .cp-eye-show {
    display: none;
}

.cp-eye.is-on .cp-eye-hide {
    display: inline-flex;
}

/* ===== Field-level validation UI ===== */
.cp-login-field-error {
    position: absolute;
    left: 0;
    top: calc(100% - 2px);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity .15s ease, transform .15s ease;
}

.cp-login-field.has-error .cp-login-field-error {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.cp-login-field.has-error {
    margin-bottom: 46px;
}

.cp-login-error-icon {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: #d32f2f;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}

.cp-login-validation {
    color: #b42318;
    font-size: 13px;
    line-height: 18px;
    margin: 0;
}

.cp-login-field.has-error .cp-login-label {
    color: #b42318;
}

.cp-login-field.has-error .cp-login-input,
.cp-login-input.invalid {
    border: 1px solid #b42318 !important;
    box-shadow: 0 0 0 1px #b42318, 0 1px 2px 0 rgba(180, 35, 24, 0.12) !important;
    outline: none !important;
    background-color: #fff5f5 !important;
}

    .cp-login-field.has-error .cp-login-input:focus,
    .cp-login-input.invalid:focus {
        border-color: #b42318 !important;
        box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.18) !important;
        outline: none !important;
    }

.cp-external form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .cp-login-page {
        grid-template-columns: 1fr;
    }

    .cp-login-left {
        display: none;
    }

    .cp-login-right {
        padding: 60px 18px 40px 18px;
    }

    .version {
        color: inherit;
    }
}

/* ===== Carousel dots + animation ===== */
.cp-login-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

    .cp-login-dots .dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        border: 0;
        padding: 0;
        background: rgba(255,255,255,0.35);
        cursor: pointer;
        transition: transform .2s ease, background .2s ease;
    }

        .cp-login-dots .dot:hover {
            transform: scale(1.2);
        }

        .cp-login-dots .dot.active {
            background: #fff;
            transform: scale(1.2);
        }

.cp-carousel-text,
.cp-carousel-media {
    will-change: opacity, transform;
}

.cp-carousel-fade-out {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 220ms ease, transform 220ms ease;
}

.cp-carousel-fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 260ms ease, transform 260ms ease;
}

#cp-carousel-img.cp-carousel-fade-out {
    transform: translateY(6px) scale(0.99);
}

#cp-carousel-img.cp-carousel-fade-in {
    transform: translateY(0) scale(1);
}

.cp-carousel-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 125% !important;
    letter-spacing: 0.2px !important;
}

.cp-carousel-subtitle {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 160% !important;
    opacity: 0.7 !important;
}

/* success state */
.cp-demo-success {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 18px 8px 24px 8px;
}

.cp-demo-success-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.cp-demo-success-subtitle {
    font-size: 14px;
    color: #4b5563;
}

/* ===== Request Demo compact layout (no scrolling) ===== */
.cp-demo-page {
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    /*padding: 56px 24px;*/
    font-family: 'Inter';
}

.cp-demo-main {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 24px;
}

.cp-demo-card {
    width: max-content;
    max-width: 80%;
    align-items: center;
    display: flex;
    flex-direction: column;
}

/* logo */
.cp-demo-brand {
    display: flex;
    width: 100%;
    height: 80px;
    padding: 0 24px;
    align-items: center;
    align-self: stretch;
    background: var(--Primary-White, #FFF);
    box-shadow: 0 6px 30px 0 rgba(0, 0, 0, 0.06);
}

.cp-demo-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-demo-header {
    text-align: center;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.cp-demo-title {
    color: var(--Text-Heading-Dark, #27272E);
    text-align: center;
    /* Sm-30/Bold-30 */
    font-family: "Open Sans";
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: 38px; /* 126.667% */
}


.cp-demo-subtitle {
    color: var(--600, #718096);
    text-align: center;
    font-feature-settings: 'salt' on;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 162.023%; /* 25.924px */
}

.cp-demo-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 50px;
}

.cp-demo-fields-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.cp-demo-fields-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cp-demo-fields-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .cp-demo-fields-row-4 {
        grid-template-columns: repeat(1, 1fr);
    }

    .cp-demo-fields-row-3 {
        grid-template-columns: repeat(1, 1fr);
    }

    .cp-demo-fields-row-2 {
        grid-template-columns: repeat(1, 1fr);
    }
}

.cp-demo-intended-use {
    display: flex;
    justify-content: center;
    width: 100%;
}

    .cp-demo-intended-use cp-field__control {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .cp-demo-intended-use .cp-field__label {
        width: 100%;
        justify-content: center;
        color: var(--Foundation-Text-text-500, #0F172A);
        text-align: center;
        /* Text md-16/Bold-16 */
        font-family: "Open Sans";
        font-size: 16px;
        font-style: normal;
        font-weight: 700;
        line-height: 24px; /* 150% */
    }

.cp-demo-intended-use-radio {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 12px;
}

    .cp-demo-intended-use-radio .cp-radio-item {
        width: 200px;
        padding: 16px;
        height: max-content;
        border-radius: 4px !important;
    }

.cp-demo-radio {
    display: flex;
    flex-direction: row;
    gap: 0;
}

    .cp-demo-radio .cp-radio-item-left {
        border-radius: 4px 0 0 4px !important;
    }

    .cp-demo-radio .cp-radio-item-right {
        border-radius: 0 4px 4px 0 !important;
    }

.grecaptcha-badge {
    bottom: 36px !important;
}

@media (max-width: 1024px) {
    .grecaptcha-badge {
        bottom: 24px !important;
    }
}

/* Radio pills — error state */
.cp-login-field.has-error .cp-radio-item,
.cp-login-field.cp-field--error .cp-radio-item {
    border-color: #b42318 !important;
    background: #fff5f5 !important;
}

    .cp-login-field.has-error .cp-radio-item .cp-radio-label::before,
    .cp-login-field.cp-field--error .cp-radio-item .cp-radio-label::before {
        border-color: #b42318 !important;
    }

    .cp-login-field.has-error .cp-radio-item .cp-radio-label,
    .cp-login-field.cp-field--error .cp-radio-item .cp-radio-label {
        color: #b42318 !important;
    }

    /* keep the selected-pill highlight visible even inside an error wrapper */
    .cp-login-field.has-error .cp-radio-item:has(input[type="radio"]:checked),
    .cp-login-field.cp-field--error .cp-radio-item:has(input[type="radio"]:checked) {
        background: rgba(180, 35, 24, 0.08) !important;
    }