/* ============================================================
   Триггер лизинга — компактная строка без рамки
   ============================================================ */

.lls-widget-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-height: 28px;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 2px 0;

    background: transparent;
    border: none;
    border-radius: 0;

    cursor: pointer;
    user-select: none;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.3;
    color: #4d4d4d;
    white-space: nowrap;
    text-align: left;

    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.lls-widget-btn:hover {
    opacity: 1;
}

.lls-widget-btn:active {
    opacity: 0.8;
}

.lls-widget-btn:focus-visible {
    outline: 2px solid #ffed4e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Текст «Оплата частями» — перебиваем инлайн-цвет script.js */
.lls-widget-btn > span:first-child {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4d4d4d !important;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.lls-widget-btn:hover > span:first-child {
    color: #111827 !important;
    text-decoration-color: #ffed4e;
}

/* Сумма «от N руб/мес» — на фирменной плашке */
.lls-widget-btn__sum {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 18px;
    padding: 2px 8px !important;
    margin-left: 2px !important;
    border-radius: 999px !important;
    background: #ffed4e !important;
    color: #111827 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.1;
    white-space: nowrap;
}

/* Скелетон-заглушка, пока грузится сумма */
.lls-widget-skeleton {
    display: inline-block;
    width: 64px;
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, #e5c93a 0%, #f5e070 50%, #e5c93a 100%);
    background-size: 200% 100%;
    animation: lls-skeleton-pulse 1.2s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes lls-skeleton-pulse {
    0%   { background-position: 100% 0; opacity: 0.85; }
    50%  { background-position: 0 0;   opacity: 1; }
    100% { background-position: 100% 0; opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
    .lls-widget-skeleton {
        animation: none;
        background: #e5c93a;
    }
}

/* Стрелка справа как индикатор клика */
.lls-widget-btn::after {
    content: "";
    width: 12px;
    height: 12px;
    margin-left: 2px;
    flex-shrink: 0;
    background-color: #c0c4c9;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M9 6l6 6-6 6'/></svg>") center/contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M9 6l6 6-6 6'/></svg>") center/contain no-repeat;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.lls-widget-btn:hover::after {
    transform: translateX(2px);
    background-color: #111827;
}

@media (max-width: 480px) {
    .lls-widget-btn {
        min-height: 26px;
        font-size: 12px;
        gap: 4px;
    }

    .lls-widget-btn > span:first-child {
        font-size: 12px !important;
    }

    .lls-widget-btn__sum {
        font-size: 12px !important;
        padding: 2px 7px !important;
        min-width: 84px;
    }

    .lls-widget-skeleton {
        width: 56px;
        height: 9px;
    }
}

/* ============================================================
   Модалка лизинга — в палитре кредита
   ============================================================ */

.lls-widget-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lls-widget-overlay.is-open {
    display: flex;
}

.lls-widget-window {
    background: #fff;
    border-radius: 12px;
    width: min(500px, 90vw);
    max-height: 85vh;
    overflow-y: auto;
    padding: 36px 32px 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
    font-family: inherit;
}

.lls-widget-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
}

.lls-widget-close:hover {
    color: #111827;
}

.lls-widget-close::before,
.lls-widget-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
}

.lls-widget-close::before {
    transform: rotate(45deg);
}

.lls-widget-close::after {
    transform: rotate(-45deg);
}

.lls-widget-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.lls-widget-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.lls-widget-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
}

.lls-widget-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.5;
}

.lls-widget-product {
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #374151;
    text-align: left;
}

.lls-widget-product-name {
    font-weight: 500;
}

.lls-widget-product-price {
    font-weight: 700;
    font-size: 18px;
    margin-top: 4px;
    color: #111827;
}

.lls-widget-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
    text-align: left;
}

.lls-widget-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.lls-widget-input:focus {
    border-color: #ffed4e;
    box-shadow: 0 0 0 3px rgba(255, 237, 78, 0.35);
}

.lls-widget-error {
    color: #ef4444;
    font-size: 12px;
    display: none;
    margin-top: 6px;
    text-align: left;
}

.lls-widget-error.is-visible {
    display: block;
}

.lls-widget-offers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.lls-widget-offer {
    padding: 16px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
    text-align: center;
}

.lls-widget-offer:hover {
    border-color: #ffed4e;
}

.lls-widget-offer.is-selected {
    border-color: #ffed4e;
    background: #fffef0;
    box-shadow: 0 4px 12px rgba(255, 237, 78, 0.35);
}

.lls-widget-offer-payment {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.lls-widget-offer-term {
    font-size: 12px;
    color: #6b7280;
}

.lls-widget-offer-overpayment {
    font-size: 11px;
    color: #9ca3af;
}

.lls-widget-submit {
    width: 100%;
    padding: 16px;
    background: #ffed4e;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 24px;
    transition: background 0.15s;
}

.lls-widget-submit:hover {
    background: #e6d400;
}

.lls-widget-submit:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.lls-widget-locked {
    overflow: hidden;
}

@media (max-width: 480px) {
    .lls-widget-window {
        padding: 24px 20px 20px;
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
}