/* market-modal.css - стили для модального окна магазина */
/* Версия 1.0 */

/* Оверлей модального окна магазина */
.market-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    z-index: 30000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.market-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Контейнер модального окна */
.market-modal-container {
    background: #0a0a0a;
    border-radius: 5px;
    border: 1px solid rgba(215, 254, 123, 0.3);
    width: 90%;
    max-width: 520px;
    height: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #0c0c0c 0%, #080808 100%);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.market-modal-overlay.active .market-modal-container {
    transform: scale(1) translateY(0);
}

/* Заголовок */
.market-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    padding: 0px 0px;
    height: 24px;
    border-bottom: 1px solid #303030;
    flex-shrink: 0;
}

.market-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #d7fe7b 0%, #b8e35e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 6px;
}

.market-modal-title svg {
    width: 16px;
    height: 16px;
    stroke: #d7fe7b;
}

.market-modal-close {
    position: absolute;
    right: 3px;
    top: 3px;
    background: rgba(255, 0, 0, 0.5);
    border: 1px solid rgba(255, 0, 0, 0.8);
    color: #fff;
    cursor: pointer;
    padding: 0px 5px;
    height: 18px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.market-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

.market-modal-close:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* Контент модального окна - скроллится */
.market-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #0e0e0e;
}

/* Стили для внутреннего контента магазина */
.market-modal-content .product-table {
    padding: 0;
    background: transparent;
    border: none;
}

.market-modal-content .table-container-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.market-modal-content .table-container {
    max-width: 100%;
    flex: 1 1 auto;
}

.market-modal-content .product-gallery {
    max-width: 100%;
    margin-bottom: 10px;
    padding: 0;
    background: transparent;
    border: none;
}

.market-modal-content .gallery-carousel {
    max-width: 100%;
}

.market-modal-content .product-description {
    margin-bottom: 5px;
    border: 1px solid #303030;
    background: #080808;
}

.market-modal-content .subscription-header {
    margin-bottom: 5px;
    border: 1px solid #303030;
    background: #080808;
}

.pricing-table.modal{
    border-radius: 3px;
}
.market-modal-content .pricing-table {
    margin-bottom: 5px;
}

.market-modal-content .product-actions {
    margin-bottom: 5px;
}

.market-modal-content .toggle-features-container {
    margin: 10px 0;
}

.market-modal-content .dropdown-wrapper2 {
    margin: 0 auto 10px auto;
}

/* Стили для выбора товара (как табы) */
.market-item-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
    background: #080808;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #303030;
}

.market-item-btn {
    background: #0a0a0a;
    border: 1px solid #303030;
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 500;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: "Unbounded", sans-serif;
}

.market-item-btn:hover {
    border-color: #d7fe7b;
    color: #d7fe7b;
}

.market-item-btn.active {
    background: rgba(215, 254, 123, 0.15);
    border-color: #d7fe7b;
    color: #d7fe7b;
}

/* Стили для выбора способа оплаты */
.market-pay-selector {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 0px;
    background: #080808;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #303030;
}

.market-pay-btn {
    background: #0a0a0a;
    border: 1px solid #303030;
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 500;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: "Unbounded", sans-serif;
}

.market-pay-btn img {
    width: 80px;
    /* height: 16px; */
    object-fit: contain;
}

.market-pay-btn:hover {
    border-color: #d7fe7b;
    color: #d7fe7b;
}

.market-pay-btn.active {
    background: rgba(215, 254, 123, 0.15);
    border-color: #d7fe7b;
    color: #d7fe7b;
}

/* Кнопка покупки */
.market-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, rgba(50, 120, 255, 0.2), rgba(106, 17, 203, 0.2));
    border: 1px solid #6d6dff;
    border-radius: 3px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Unbounded", sans-serif;
    margin-top: 5px;
}

.market-buy-btn:hover {
    border-color: #d7fe7b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Информация о выбранном товаре */
.market-selected-info {
    background: #080808;
    border: 1px solid #303030;
    border-radius: 3px;
    padding: 8px 10px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.market-selected-term {
    font-size: 11px;
    color: #d7fe7b;
}

.market-selected-price {
    font-size: 14px;
    font-weight: bold;
    color: #ffb347;
}

/* Адаптация */
@media (max-width: 480px) {
    .market-modal-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .market-item-btn, .market-pay-btn {
        font-size: 9px;
        padding: 4px 8px;
    }
    
    .market-selected-info {
        flex-direction: column;
        text-align: center;
    }
}