/* =====================================================
   MODAL.CSS - Стили модальных окон (товар, киты, согласие)
   ===================================================== */

/* ------------------- 1. ОСНОВНЫЕ МОДАЛЬНЫЕ ОКНА ------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: rgba(25, 25, 30, 0.8);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 2% auto;
    border: 3px solid #888;
    width: 80%;
    max-width: 500px;
    text-align: center;
    position: relative;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: scroll;
}

/* Скрываем скроллбар в модальных окнах */
.modal-content::-webkit-scrollbar {
    display: none;
}

/* Кнопка закрытия модального окна */
.close {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Изображение в модальном окне */
.modal img {
    transform: scale(0.6);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}


/* ------------------- 2. ЦЕНА В МОДАЛЬНОМ ОКНЕ ------------------- */
.modal-price {
    font-size: 20px;
    font-weight: bold;
    margin: 10px 0;
}


/* ------------------- 3. МОДАЛЬНЫЕ ОКНА ДЛЯ ТЕКСТОВ (ДОКУМЕНТЫ, РЕКВИЗИТЫ) ------------------- */
.modal-text {
    color: #ccc;
    line-height: 1.6;
}

.modal-text p {
    margin-bottom: 12px;
}

.modal-text a {
    color: #FFD700;
    text-decoration: none;
}

.modal-text a:hover {
    text-decoration: underline;
}

.modal-text hr {
    border-color: rgba(255, 255, 255, 0.1);
}


/* ------------------- 4. МОДАЛЬНОЕ ОКНО КИТОВ (СОСТАВ НАБОРА) ------------------- */
#kitViewModal .modal-content {
    max-width: 700px;
}

/* Контейнер для предметов кита */
#kitViewItems {
    margin: 20px 0;
}

/* Сетка предметов в ките */
.kit-items-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 15px;
    background-color: #1E2026;
    border-radius: 8px;
    margin: 15px 0;
    max-height: 400px;
    overflow-y: auto;
}

/* Карточка предмета в ките */
.kit-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2C2F36;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.kit-item img {
    width: 110%;
    height: 110%;
    object-fit: cover;
    display: block;
}

.kit-item .item-amount {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #FFD700;
    font-weight: bold;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

.kit-item .item-name {
    display: none;
}

/* Заголовок кита */
.kit-header {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    margin: 0 0 10px 0 !important;
    padding-bottom: 5px;
    border-bottom: 1px solid #FFD700;
    display: block;
    width: 100%;
}

/* Первый заголовок без верхнего отступа */
.kit-header:first-of-type {
    margin-top: 0 !important;
}

/* Все остальные заголовки с отступом сверху */
.kit-header:not(:first-of-type) {
    margin-top: 20px !important;
}

/* Убираем нижний отступ у сетки */
.kit-items-grid {
    margin-bottom: 0 !important;
}

/* Последняя сетка не нуждается в отступе */
.kit-items-grid:last-child {
    margin-bottom: 0 !important;
}

.kit-section {
    margin-bottom: 0 !important;
}


/* ------------------- 5. ОКНО СОГЛАСИЯ (ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ) ------------------- */
#consentModal .modal-content {
    padding: 20px 25px 30px 25px !important;
}

#consentModal h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

#consentModal .modal-text {
    padding: 0 !important;
}

#consentModal p {
    margin-bottom: 25px;
    line-height: 1.5;
}

#consentModal button {
    padding: 10px 30px !important;
    margin: 0 5px !important;
}


/* ------------------- 6. МОДАЛЬНОЕ ОКНО ПОДТВЕРЖДЕНИЯ ДЕЙСТВИЯ ------------------- */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.confirm-modal-content {
    background: #1E2026;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid #3A3F48;
}

.confirm-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirm-modal-title {
    color: white;
    margin-bottom: 12px;
}

.confirm-modal-message {
    color: #ccc;
    margin-bottom: 24px;
}

.confirm-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-modal-btn-yes {
    background: #E53935;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
}

.confirm-modal-btn-no {
    background: #2C2F36;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
}