/**
 * Sports Meister Competitions - Frontend Rounds & Filters
 * Rounds display, filters panel, venues, and pagination
 *
 * @package Sports_Meister_Competitions
 * @since 1.0.0
 * @requires frontend-core.css
 */

/* Competition Rounds Display */
.smc-rounds-container {
    max-width: 1200px !important;
    width: auto;
    margin: 0 auto;
    margin-top: 1rem;
    padding: 0rem 0 16px;
    background: #fff;
    border-radius: var(--smc-border-radius);
    box-shadow: var(--smc-box-shadow);
    position: relative;
}

@media (min-width: 1100px) {
    .smc-rounds-container {
        width: 1100px;
    }
}

/* ========================================
   Filters Panel & Toggle Button
   ======================================== */

/* Filters Header Bar - Outside Container */
.smc-filters-header-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.smc-rounds-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    max-width: 1200px !important;
    margin: 0;
    flex-wrap: nowrap;
    margin-bottom: 1.5rem !important;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e4e4e4 !important;
}
/*
.smc-round-tabs-container {
    margin: 0 0 1.25rem;
}
*/
.smc-round-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px;
    margin: 0;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1), rgba(6, 182, 212, 0.1));
    scrollbar-color: #9bc3d7 transparent;
}

.smc-round-tabs::-webkit-scrollbar {
    height: 6px;
}

.smc-round-tabs::-webkit-scrollbar-thumb {
    background: rgba(31, 41, 51, 0.25);
    border-radius: 999px;
}

.smc-round-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.smc-round-tab {
    border: none;
    background: #f5f7fb;
    color: #1f2933;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.smc-round-tab:hover:not(.active) {
    background: #e3e9f5;
    color: #4a5058;
}

.smc-round-tab.active {
    background: var(--smc-primary);
    color: #fff;
    /*box-shadow: 0 6px 16px rgba(32, 82, 149, 0.25);*/
}

.smc-round-tab-reset,
.smc-round-tab-reset:hover {
    background: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
    flex-shrink: 0;
    height: auto !important;
    width: fit-content !important;
    font-size: 12px !important;
}

.smc-round-tab-reset:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
}

.smc-rounds-toolbar .smc-progress-header {
    width: 100%;
}

.smc-rounds-toolbar-left {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 1 1 auto;
    width: 100%;
}

.smc-rounds-toolbar .smc-manager-actions {
    display: flex;
    align-items: center;
}

.smc-rounds-toolbar .smc-manager-actions .smc-button {
    white-space: nowrap;
}
.select2-container:not(.select2-container--dashboard) .select2-selection.select2-selection--multiple {
    border-radius: 16px !important;
    padding: 6px 12px !important;
    background-color: var(--e-global-color-8054e71) !important;
    border-radius: 1rem !important;
    transition: background-color 0.2s;
    text-transform: capitalize;
}

.smc-rounds-toolbar .smc-progress-container {
    flex: 1 1 260px;
    margin: 0;
    padding: 0;
    background: transparent;
    align-items: center;
    justify-content: center;
    display: flex;
    gap: 1rem;
}

.smc-rounds-toolbar .smc-progress-header {
    margin-bottom: 0;
    gap: 0rem;
    padding: 0px 12px;
    border-radius: 16px;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1), rgba(6, 182, 212, 0.1));
}

.smc-rounds-toolbar .smc-progress-stats {
    font-size: 0.95rem;
}

.smc-rounds-toolbar .smc-progress-bar {
    height: 20px;
}

.smc-rounds-toolbar .smc-progress-fill {
    font-size: 0.75rem;
    padding-right: 0.75rem;
}

.smc-rounds-toolbar .smc-filters-header-bar {
    margin: 0;
    padding: 0;
    max-width: none;
    flex: 0 0 auto;
}

/* Filters Toggle Button */
.smc-filters-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--smc-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(75, 146, 175, 0.2);
    position: relative;
}

.smc-filters-toggle-btn:hover {
    background: var(--smc-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 146, 175, 0.3);
}

.smc-filters-toggle-btn:active {
    transform: translateY(0);
}

.smc-filters-toggle-btn svg {
    flex-shrink: 0;
}

/* Active Filters Indicator */
.smc-filters-toggle-btn.has-filters::after {
    content: '';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Reset Button in Header Bar */
.smc-filters-reset-header-btn {
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
   /* width: 40px !important;*/
    min-width: 40px !important;
    height: 40px;
    vertical-align: middle;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

/* Filters Panel - Slide-in from Right */
.smc-filters-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.smc-filters-panel.active {
    transform: translateX(0);
}

/* Filters Panel Header */
.smc-filters-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(
        to right,
        rgba(59, 130, 246, 0.1),
        rgba(168, 85, 247, 0.1),
        rgba(6, 182, 212, 0.1)
    );
    border-bottom: 1px solid var(--smc-gray-200);
    flex-shrink: 0;
}

.smc-filters-panel-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--smc-gray-900) !important;
    margin: 0 !important;
}

.smc-filters-panel-close {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--smc-gray-500);
    transition: color 0.2s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smc-filters-panel-close:hover {
    color: var(--smc-gray-900);
}

.smc-filters-panel-close svg {
    width: 24px;
    height: 24px;
}

/* Filters Panel Body */
.smc-filters-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #F3F4F8;
}

/* Filter Group */
.smc-filter-group {
    margin-bottom: 1.5rem;
}

.smc-filter-group:last-child {
    margin-bottom: 0;
}

.smc-filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--smc-gray-900);
    margin-bottom: 0.5rem;
}

/* Select2 Filter Styling */
.smc-filter-select {
    width: 100% !important;
    border: 2px solid var(--smc-gray-300);
    border-radius: 8px;
    padding: 0.625rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease;
}

.smc-filter-select:focus {
    outline: none;
    border-color: var(--smc-primary);
    box-shadow: 0 0 0 3px rgba(75, 146, 175, 0.1);
}

/* Select2 Overrides for Filter Panel */
.smc-filters-panel-body .select2-container {
    width: 100% !important;
}

.smc-filters-panel-body .select2-container--default.select2-container .select2-selection--multiple.select2-selection {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    min-height: 42px;
    padding: 6px 8px !important;
    position: relative;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.smc-filters-panel-body .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 0 !important;
    margin: 0;
    width: auto !important;
}

.smc-filters-panel-body .select2-container--default.select2-container--focus .select2-selection--multiple,
.smc-filters-panel-body .select2-container--default .select2-selection--multiple:focus-within {
    border-color: #4b92af !important;
    box-shadow: 0 0 0 3px rgba(75, 146, 175, 0.12);
}

.smc-filters-panel-body .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--smc-primary);
    border: none !important;
    color: #fff !important;
    padding: 6px 10px !important;
    border-radius: 10px !important;
    margin: 0 !important;
    font-size: 13px;
    display: inline-flex !important;
    align-items: center;
    line-height: 1.4;
}

.smc-filters-panel-body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff !important;
    background-color: #3a3a3a !important;
    border: none !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin-right: 5px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: static !important;
    float: none !important;
    font-size: 10px;
    line-height: 1;
    flex-shrink: 0;
}

.smc-filters-panel-body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: #555 !important;
    color: #fff !important;
}

.smc-filters-panel-body .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    color: var(--smc-gray-500);
}

.smc-filters-panel-body .select2-container .select2-search--inline {
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
    flex: 1 1 50px;
}

.smc-filters-panel-body .select2-container .select2-search--inline .select2-search__field {
    box-sizing: border-box;
    border: none;
    font-size: 14px;
    margin: 0;
    padding: 0;
    max-width: 100%;
    resize: none;
   /* height: 28px;*/
    overflow: hidden;
    line-height: 1.4;
}

