
:root {
    --color-1: #FF9AA2;  /* Soft pink */
    --color-2: #FFB7B2;  /* Light coral */
    --color-3: #FFDAC1;  /* Peach */
    --color-4: #E2F0CB;  /* Mint green */
    --color-5: #B5EAD7;  /* Aqua */
    --color-6: #C7CEEA;  /* Lavender */
    --color-7: #F8B195;  /* Salmon */
    --color-8: #F67280;  /* Watermelon */
    --color-9: #C06C84;  /* Dusty rose */
    --color-10: #6C5B7B; /* Deep purple */
    --color-11: #355C7D; /* Navy blue */
    --color-12: #A8E6CE; /* Pale teal */
    --color-13: #DCEDC2; /* Lime */
    --color-14: #FFD3B5; /* Apricot */
    --color-15: #FFAAA6; /* Coral */
    --color-16: #FF8C94; /* Dark pink */
}
.tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    box-sizing: border-box;
    align-self: stretch;
}
.tile {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    box-shadow: 4px 4px 20px rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    background-color: #1a1a1a;
    border: 1px solid #333;
    box-sizing: border-box;
    color: #fff;
}

.title-wrapper {
    border-radius: 1rem;
    width: 100%;
    height: 13rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.5rem;
    box-sizing: border-box;
    background-color: var(--color-5);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
}

.details-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 38px;
    font-size: 16px;
    padding: 1rem;
    box-sizing: border-box;
}

.details {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 15px;
}
.div {
    position: relative;
}
.component-4 {
    width: 125px;
    border-radius: 25px;
    background-color: #ff9000;
    height: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.tournament-name {
    align-self: stretch;
    position: relative;
    font-size: 1.5rem;
    font-weight: 600;
}
.tournament-description {
    align-self: stretch;
    position: relative;
    color: #ccc;
    font-size: 0.8rem;
}
.div3 {
    width: 43px;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
.mafia-pro {
    width: 73px;
    position: relative;
    color: #fff;
    text-align: right;
    display: inline-block;
    flex-shrink: 0;
}
.group {
    align-self: stretch;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0px;
}
.detail-label {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.detail-value {
    position: relative;
    color: #fff;
    text-align: right;
    display: inline-block;
    flex-shrink: 0;
}

.frame-container {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    color: #888;
}

.view-btn {
    /*width: 437px;*/
    border-radius: 8px;
    background-color: #ff3c3c;
    /*height: 45px;*/
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 8rem;
    box-sizing: border-box;
    --clm-btn-text: #FFF; /* If needed for contrast */
    --clm-btn-hover: #F67280;
    --clm-btn-text-hover: black;
}
.register-btn {
    flex: 1;
    border-radius: 8px;
    /*background-color: #ff9000;*/
    /*height: 47px;*/
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 4rem;
    box-sizing: border-box;
}

.btn-orange {
    --clm-btn: #ff9000;
    --clm-btn-hover: #F67280;
    --clm-btn-text: #FFF; /* If needed for contrast */
    --clm-btn-text-hover: black;
}
.tournament-buttons-wrapper {
    align-self: stretch;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    text-align: center;
    font-size: 1rem;
    line-height: 24px;
    font-weight: 600;
}



.tournament-view {
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.club-avatar-wrapper {
    width: 18rem;
    height: 10rem;
}
.tournaments-div{
    width: 100%;
    box-sizing: border-box;
    align-self: stretch;
}
.club-menu {
    /* убрал float для лучшей совместимости */
}
.club-menu a{
    display: inline-block;
    color: #929191;
    padding: 10px;
}
.table-head{
    font-size: 24px;
    font-weight: bold;
}

/* ============================================
   Мобильная адаптация турниров
   ============================================ */

@media (max-width: 768px) {
    /* Плитки — 1 колонка */
    .tiles {
        grid-template-columns: 1fr;
    }

    /* Баннер плитки */
    .title-wrapper {
        height: 8rem;
        padding: 1rem;
    }

    /* Детали плитки */
    .details-wrapper {
        gap: 1rem;
        padding: 0.75rem;
        font-size: 14px;
    }
    .tournament-name {
        font-size: 1.2rem;
    }

    /* Кнопки в плитке */
    .tournament-buttons-wrapper {
        flex-direction: column;
    }
    .view-btn {
        padding: 0.5rem 2rem;
        width: 100%;
    }
    .register-btn {
        padding: 0.5rem 2rem;
        width: 100%;
    }

    /* Табличный вид — горизонтальный скролл */
    .tournaments-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    .tournaments-table .content-table {
        min-width: 700px;
    }
    /* Сбрасываем мобильный override для колонок таблицы — они должны иметь фиксированную ширину */
    .tournaments-table .w-10 {
        width: 10rem;
        max-width: 10rem;
        flex-shrink: 0;
    }
    .tournaments-table .w-15 {
        width: 15rem;
        max-width: 15rem;
        flex-shrink: 0;
    }

    /* Аватар турнира */
    .club-avatar-wrapper {
        width: 100%;
        height: 8rem;
    }

    /* Табы и фильтры */
    .tournaments-div {
        flex-wrap: wrap;
    }
    .club-menu a {
        padding: 8px;
        font-size: 14px;
    }

    /* ─── icon-btn в сайдбаре (кнопка редактирования турнира) ─── */
    .tournament-view .sidebar .action-btn.icon-btn,
    .action-btn.icon-btn {
        background-color: transparent !important;
        box-shadow: none;
        min-width: auto;
        min-height: auto;
        font-size: 1.25rem !important;
        line-height: 1.25rem;
        padding: 0.25rem;
        color: rgba(255, 255, 255, 0.6);
    }
    .action-btn.icon-btn:hover {
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: #fff;
    }

    /* ─── Иконки-кнопки в табах турнира ─── */
    /* Убираем фон, делаем компактными — переопределяем 44px из clm.css */
    .tournament-banner .action-btn {
        background-color: transparent !important;
        box-shadow: none;
        min-width: auto;
        min-height: auto;
        font-size: 1.25rem !important;
        line-height: 1.25rem;
        padding: 0.25rem;
        color: rgba(255, 255, 255, 0.7);
        border-radius: 0.4rem;
    }
    .tournament-banner .action-btn:hover {
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: #fff;
    }
    /* Переопределяем font-size: 1.75rem !important из clm.css */
    .tournament-banner .action-buttons .action-btn {
        width: auto;
        height: auto;
        font-size: 1.25rem !important;
    }
    /* Сохраняем цвета иконок по состоянию */
    .tournament-banner .action-btn.success,
    .tournament-banner .action-btn.dark.success {
        color: var(--clm-text-green-light, #10b981);
    }
    .tournament-banner .action-btn.red,
    .tournament-banner .action-btn.danger {
        color: var(--clm-red, #c62828);
    }
    /* Размер иконок внутри кнопок */
    .tournament-banner .action-btn .material-symbols-outlined,
    .tournament-banner .action-btn span {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .title-wrapper {
        height: 6rem;
    }
    .details-wrapper {
        font-size: 13px;
    }
}
