/*
 * customCss-login-checkout.css — /login/checkoutasguest modal
 * Loaded only when Model.CheckoutAsGuest on Login.cshtml
 */

/* Puslapio „apvalkalas“ paslepiamas — matomas tik iframe fonas + modalas */
html.html-login-checkout-modal,
html.login-checkout-modal-open {
    overflow: hidden;
}

html.html-login-checkout-modal body,
html.login-checkout-modal-open body {
    overflow: hidden;
}

html.html-login-checkout-modal .header,
html.html-login-checkout-modal .footer,
html.html-login-checkout-modal .footer-upper,
html.html-login-checkout-modal #go-to-top,
html.html-login-checkout-modal .mobile-bottom-nav {
    display: none !important;
}

html.html-login-checkout-modal .master-wrapper-content,
html.html-login-checkout-modal .master-column-wrapper,
html.html-login-checkout-modal .login-page--checkout-modal,
html.html-login-checkout-modal .login-page--checkout-modal .page-body {
    margin: 0;
    padding: 0;
    background: transparent !important;
    min-height: 0;
}

html.html-login-checkout-modal .breadcrumb {
    display: none !important;
}

/* Fono sluoksnis — ankstesnio puslapio (krepšelis) vaizdas */
.login-checkout-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    overflow: hidden;
    pointer-events: none;
}

.login-checkout-backdrop__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    pointer-events: none;
}

.login-checkout-backdrop__dim {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.52);
    pointer-events: none;
}

.login-checkout-backdrop--inline {
    display: none;
    pointer-events: auto;
}

.login-checkout-backdrop--inline:not([hidden]) {
    display: block;
}

.login-checkout-backdrop--inline .login-checkout-backdrop__dim {
    pointer-events: auto;
    cursor: pointer;
}

/* Modalas virš fono */
.login-checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
}

.login-checkout-overlay:not([hidden]) {
    display: flex;
}

.login-checkout-modal {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 860px;
    margin: auto;
    padding: 22px 24px 26px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    color: #434242;
    pointer-events: auto;
}

.login-checkout-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: #f8fafc;
    color: #434242;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.login-checkout-modal__close:hover,
.login-checkout-modal__close:focus {
    background: var(--jupoja-yellow, #FCDF00);
    border-color: var(--jupoja-yellow, #FCDF00);
    color: #434242;
    outline: none;
}

.login-checkout-modal__close span {
    display: block;
    margin-top: -2px;
}

.login-checkout-modal__title {
    margin: 0 0 18px;
    padding-right: 40px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: #434242;
    text-align: left;
}

.login-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: start;
}

.login-checkout-grid--single {
    grid-template-columns: 1fr;
}

.login-checkout-modal--admin .login-checkout-col--existing {
    padding-right: 0;
}

.login-checkout-col {
    min-width: 0;
}

.login-checkout-col--existing {
    padding-right: 22px;
}

.login-checkout-col--guest {
    padding-left: 22px;
    border-left: 1px solid #e5e7eb;
}

.login-checkout-col__title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #434242;
}

.login-checkout-field {
    margin-bottom: 10px;
}

.login-checkout-field > label,
.login-checkout-form .inputs > label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #434242;
}

.login-checkout-field input.email,
.login-checkout-field input.username,
.login-checkout-password input.password {
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d4dae3;
    border-radius: 5px;
    background: #fff;
    color: #434242;
    font-size: 14px;
    transition: border-color 0.15s ease;
}

.login-checkout-password {
    position: relative;
}

.login-checkout-password input.password {
    padding-right: 44px;
}

.login-checkout-password .password-eye {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
}

.login-checkout-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    margin: 2px 0 12px;
}

.login-checkout-remember {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.login-checkout-options .forgot-password {
    margin: 0;
}

.login-checkout-options .forgot-password a {
    font-size: 14px;
    font-weight: 600;
    color: #1B47A0;
    text-decoration: none;
}

.login-checkout-options .forgot-password a:hover {
    text-decoration: underline;
}

.login-checkout-submit,
.login-checkout-guest-btn {
    display: block;
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 8px 14px;
    border: none !important;
    border-radius: 5px !important;
    background: var(--jupoja-yellow, #FCDF00) !important;
    color: #434242 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.login-checkout-submit:hover,
.login-checkout-submit:focus,
.login-checkout-guest-btn:hover,
.login-checkout-guest-btn:focus {
    background: #f0d000 !important;
    color: #1a1a1a !important;
}

.login-checkout-register-btn {
    display: block;
    width: 100%;
    min-height: 38px;
    margin: 8px 0 0;
    padding: 8px 14px;
    border: 1px solid #d4dae3 !important;
    border-radius: 5px !important;
    background: #f3f5f8 !important;
    color: #434242 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.login-checkout-register-btn:hover,
.login-checkout-register-btn:focus {
    background: #e8ecf1 !important;
    border-color: #c5ccd6 !important;
}

.login-checkout-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: #6b7280;
    font-size: 14px;
    text-transform: lowercase;
}

.login-checkout-divider::before,
.login-checkout-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e5e7eb;
}

/* Social (jupoja-social-login) — modalas; !important prieš temos geltonas <a> */
.login-checkout-modal .jupoja-social-login,
.login-checkout-col--existing .jupoja-social-login {
    max-width: none;
    width: 100%;
    margin: 12px 0 0;
}

.login-checkout-modal .jupoja-social-login__divider {
    margin: 2px 0 10px;
    color: #6b7280 !important;
    font-size: 13px;
}

.login-checkout-modal .jupoja-social-login__buttons,
.login-checkout-col--existing .jupoja-social-login__buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
}

.login-checkout-modal .jupoja-social-login__btn,
.login-checkout-col--existing .jupoja-social-login__btn {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 1px solid #d4dae3 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #434242 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.login-checkout-modal .jupoja-social-login__btn:hover,
.login-checkout-modal .jupoja-social-login__btn:focus,
.login-checkout-col--existing .jupoja-social-login__btn:hover,
.login-checkout-col--existing .jupoja-social-login__btn:focus {
    background: #f8fafc !important;
    border-color: #c5ccd6 !important;
    color: #434242 !important;
    text-decoration: none !important;
}

.login-checkout-modal .jupoja-social-login__text,
.login-checkout-col--existing .jupoja-social-login__text {
    color: #434242 !important;
}

.login-checkout-modal .jupoja-social-login__icon,
.login-checkout-col--existing .jupoja-social-login__icon {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: 20px;
    height: 20px;
}

/* Senas selektorius — jei kur nors liktų */
.login-checkout-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-checkout-social-btn {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid #d4dae3;
    border-radius: 5px;
    background: #fff;
    color: #434242 !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.login-checkout-social-btn:hover,
.login-checkout-social-btn:focus {
    background: #f8fafc;
    border-color: #c5ccd6;
    color: #434242 !important;
    text-decoration: none;
}

.login-checkout-social-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}

.login-checkout-guest-text {
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #5b5b5b;
}

.login-register-subtitle {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.35;
    color: #434242;
}

.login-register-benefits {
    margin: 0 0 8px;
    padding-left: 16px;
    font-size: 12px;
    line-height: 1.4;
    color: #5b5b5b;
}

.login-register-benefits li {
    margin-bottom: 2px;
}

.login-checkout-guest-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.login-checkout-modal .message-error {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 5px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
}

.login-checkout-modal .message-error.validation-summary-errors,
.login-checkout-modal .message-error:not(:empty) {
    display: block !important;
}

.login-checkout-modal .message-error.validation-summary-valid:empty {
    display: none !important;
}

@media (max-width: 767px) {
    .login-checkout-overlay {
        padding: 16px 12px;
        align-items: flex-start;
    }

    .login-checkout-modal {
        padding: 16px 14px 18px;
        border-radius: 6px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .login-checkout-modal__close {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    .login-checkout-modal__title {
        margin-bottom: 14px;
        font-size: 18px;
    }

    .login-checkout-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .login-checkout-col--existing {
        padding-right: 0;
    }

    .login-checkout-col--guest {
        padding-left: 0;
        padding-top: 16px;
        border-left: 0;
        border-top: 1px solid #e5e7eb;
    }

    .login-checkout-col__title {
        font-size: 15px;
        margin-bottom: 10px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .login-checkout-modal {
        padding: 24px 20px 28px;
    }

    .login-checkout-col--existing {
        padding-right: 20px;
    }

    .login-checkout-col--guest {
        padding-left: 20px;
    }
}
