/* ========================================
   КОМПОНЕНТ: tab-panel
   Описание: Панель с табами (горизонтальная и вертикальная)
   ======================================== */

/* Базовая панель табов */
.tab-panel {
    display: flex;
    align-items: center;
    padding: 0;
    
    background: linear-gradient(180deg, rgba(79, 64, 67, 1) 0%, rgba(67, 55, 57, 1) 100%);
    border-radius: 12px;
    
    position: relative;
    overflow: hidden;
}

/* Градиентная рамка через псевдоэлемент */
.tab-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(212, 199, 196, 0.32) 0%, rgba(212, 199, 196, 0.16) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ========================================
   SIZE VARIANTS - Размеры
   ======================================== */

/* Default size - горизонтальная */
.tab-panel {
    flex-direction: row;
    height: 64px;
    width: 100%;
}

/* ========================================
   TAB ITEMS - Элементы табов
   ======================================== */

/* Контейнер для таба */
.tab-panel__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    height: 100%;
    padding: 0 12px;
    

    font-weight: 600;
    font-size: 18px;
    line-height: 1.33;
    text-align: center;
    color: #FFFFFF;
    
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    position: relative;
    white-space: nowrap;
}

/* Иконка в табе */
.tab-panel__item-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.tab-panel__item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Текст в табе */
.tab-panel__item-text {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px 0 0;
    position: relative;
    z-index: 10;
}

/* Декоративные элементы для открытого таба */
.tab-panel__item-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

/* Звезды слева */
.tab-panel__item-decoration--left {
    left: 12px;
    top: 14px;
    width: 22px;
    height: 36px;
}

/* Звезды справа */
.tab-panel__item-decoration--right {
    right: 12px;
    top: 12px;
    width: 18px;
    height: 40px;
}

/* ========================================
   TAB STATES - Состояния табов
   ======================================== */

/* Default состояние */
.tab-panel__item {
    background: transparent;
}

.tab-panel__item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Open/Active состояние */
.tab-panel__item.is-open,
.tab-panel__item.is-active {
    background: linear-gradient(180deg, rgba(162, 102, 63, 1) 0%, rgba(186, 122, 79, 1) 100%);
    box-shadow: 0px 16px 100px 100px rgba(21, 19, 21, 0.52);
    position: relative;
}

/* Градиентная рамка через псевдоэлемент для активного таба */
.tab-panel__item.is-open::after,
.tab-panel__item.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(251, 206, 157, 1) 0%, rgba(251, 206, 157, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* Эффект свечения для открытого таба */
.tab-panel__item.is-open::before,
.tab-panel__item.is-active::before {
    content: '';
    position: absolute;
    left: 9.14px;
    top: 8px;
    width: 170.22px;
    height: 111px;
    background: linear-gradient(2deg, rgba(249, 176, 98, 1) 62%, rgba(250, 180, 107, 0) 100%);
    filter: blur(32px);
    pointer-events: none;
    z-index: 0;
}

.tab-panel__item.is-open:hover,
.tab-panel__item.is-active:hover {
    background: linear-gradient(180deg, rgba(148, 93, 58, 1) 0%, rgba(172, 113, 73, 1) 100%);
}

/* ========================================
   SEPARATORS - Разделители
   ======================================== */

.tab-panel__separator {
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, rgba(251, 206, 157, 0) 0%, rgba(251, 206, 157, 0.48) 50%, rgba(251, 206, 157, 0) 100%);
    flex-shrink: 0;
}


/* ========================================
   MEDIA QUERIES - Адаптивность (Desktop-first)
   ======================================== */

/* ≤1599 */
@media (max-width: 1599px) {
}

/* ≤1439 */
@media (max-width: 1439px) {
}

/* ≤1279 */
@media (max-width: 1279px) {
}

/* ≤959 */
@media (max-width: 959px) {
    /* Компактная версия для маленьких экранов */
    .tab-panel__item {
        flex-direction: column;
        gap: 4px;
        padding: 8px 12px;
        font-size: 12px;
        font-weight: 500;
    }
    
    .tab-panel__item-icon {
        width: 24px;
        height: 24px;
    }
    
    .tab-panel__item.is-open::before,
    .tab-panel__item.is-active::before {
        left: 4.57px;
        width: 85.11px;
    }
}

/* ≤599 */
@media (max-width: 599px) {
    .tab-panel {
        height: 56px;
    }
    
    .tab-panel__item {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .tab-panel__item-icon {
        width: 20px;
        height: 20px;
    }
}

/*
HTML разметка:

Адаптивная панель табов (автоматически переключается между стилями):
- На экранах ≥960px: горизонтальная компоновка с большими иконками
- На экранах <960px: компактная версия с вертикальной компоновкой
- На экранах ≤599px: максимально компактная версия

<div class="tab-panel">
  <button class="tab-panel__item is-open">
    <img src="icon.svg" alt="" class="tab-panel__item-icon">
    <span class="tab-panel__item-text">Slots</span>
  </button>
  
  <div class="tab-panel__separator"></div>
  
  <button class="tab-panel__item">
    <img src="icon.svg" alt="" class="tab-panel__item-icon">
    <span class="tab-panel__item-text">Live games</span>
  </button>
  
  <div class="tab-panel__separator"></div>
  
  <button class="tab-panel__item">
    <img src="icon.svg" alt="" class="tab-panel__item-icon">
    <span class="tab-panel__item-text">Game show</span>
  </button>
</div>
*/

