/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --lls-yellow: #ffea00;
    --lls-yellow-dark: #e6d300;
    --lls-blue: #2563eb;
    --lls-blue-dark: #1d4ed8;
    --lls-error: #ef4444;
    --lls-gray-50: #f9fafb;
    --lls-gray-100: #f3f4f6;
    --lls-gray-200: #e5e7eb;
    --lls-gray-300: #d1d5db;
    --lls-gray-400: #9ca3af;
    --lls-gray-500: #6b7280;
    --lls-gray-600: #4b5563;
    --lls-gray-700: #374151;
    --lls-gray-800: #1f2937;
    --lls-gray-900: #111827;
    --lls-black: #000000;
    --lls-radius: 8px;
    --lls-radius-lg: 12px;
}

/* ===== ТРИГГЕР ===== */
.lls-trigger {
    display: block;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 6px;
}

.lls-trigger__label {
    color: var(--lls-blue);
    font-weight: 500;
    margin-right: 8px;
}

.lls-trigger:hover .lls-trigger__label {
    color: var(--lls-blue-dark);
}

.lls-trigger__price {
    color: var(--lls-gray-900);
    font-weight: 700;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.lls-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: llsFadeIn 0.2s ease;
}

.lls-modal.is-open {
    display: flex;
}

@keyframes llsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lls-modal__window {
    background: #fff;
    border-radius: var(--lls-radius-lg);
    width: min(400px, 90vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px 32px 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: llsScaleIn 0.2s ease;
}

@keyframes llsScaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Крестик */
.lls-modal__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: var(--lls-gray-400);
    transition: color 0.15s;
    padding: 0;
}

.lls-modal__close:hover {
    color: var(--lls-gray-800);
}

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

.lls-modal__close::before { transform: rotate(45deg); }
.lls-modal__close::after  { transform: rotate(-45deg); }

/* Логотип */
.lls-modal__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

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

/* Заголовок */
.lls-modal__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--lls-gray-800);
    margin: 0 0 8px 0;
}

.lls-modal__subtitle {
    font-size: 14px;
    color: var(--lls-gray-500);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* Товар */
.lls-modal__product {
    background: var(--lls-gray-50);
    border-radius: var(--lls-radius);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--lls-gray-700);
    text-align: left;
}

.lls-modal__product-name {
    font-weight: 500;
    color: var(--lls-gray-900);
    margin-bottom: 4px;
}

.lls-modal__product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--lls-gray-900);
}

/* Телефон */
.lls-modal__phone-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--lls-gray-500);
    margin-bottom: 6px;
    text-align: left;
}

.lls-modal__phone-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--lls-gray-200);
    border-radius: var(--lls-radius);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    text-align: center;
    transition: border-color 0.15s;
}

.lls-modal__phone-input:focus {
    border-color: var(--lls-yellow);
    box-shadow: 0 0 0 3px rgba(255, 234, 0, 0.15);
}

.lls-modal__phone-input::placeholder {
    color: var(--lls-gray-300);
}

/* Ошибка */
.lls-modal__phone-error {
    color: var(--lls-error);
    font-size: 12px;
    display: none;
    margin-top: 6px;
    text-align: left;
}

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

/* Кнопка Оформить */
.lls-modal__submit {
    width: 100%;
    padding: 16px;
    background: var(--lls-yellow);
    color: var(--lls-black);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--lls-radius);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    margin-top: 24px;
}

.lls-modal__submit:hover {
    background: var(--lls-yellow-dark);
}

.lls-modal__submit:disabled {
    background: var(--lls-gray-200);
    color: var(--lls-gray-400);
    cursor: not-allowed;
}

/* Блокировка скролла */
.lls-body-locked {
    overflow: hidden;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
    .lls-trigger {
        font-size: 13px;
        margin-top: 6px;
    }

    .lls-modal__window {
        padding: 28px 24px 24px;
    }

    .lls-modal__title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .lls-trigger {
        font-size: 13px;
        margin-top: 6px;
    }

    .lls-modal__window {
        padding: 24px 20px 20px;
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .lls-modal__title {
        font-size: 18px;
    }

    .lls-modal__subtitle {
        font-size: 13px;
    }

    .lls-modal__phone-input {
        font-size: 15px;
        padding: 12px 14px;
    }

    .lls-modal__submit {
        font-size: 15px;
        padding: 14px;
    }
}

/* ===== ТОУЧ-УСТРОЙСТВА ===== */
@media (hover: none) and (pointer: coarse) {
    .lls-trigger:active {
        opacity: 0.7;
    }
}