/* ============================================
   MTG FILTER WIDGET
   ============================================ */

.mtg-filters-widget {
    /* background: #fff; */
    padding: 20px;
    border-radius: 4px;
    color: #52351B;
    /* border: 1px solid #e0e0e0; */
}

.mtg-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.mtg-filters-header h3 {
    margin: 0;
    font-size: 20px;
    /* color: #333; */
}

.mtg-clear-filters {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.mtg-clear-filters:hover {
    background: #c82333;
}

/* ============================================
   FILTER SECTIONS
   ============================================ */

.mtg-filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(47, 33, 20, 0.21);
    /* border-bottom: 1px solid #f0f0f0; */
}

.mtg-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mtg-filter-section h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    /* color: #555; */
    font-weight: 600;
}

/* ============================================
   COLOR IDENTITY TOGGLES
   ============================================ */

.mtg-color-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mtg-color-toggle {
    cursor: pointer;
    position: relative;
}

.mtg-color-toggle input {
    position: absolute;
    opacity: 0;
}

.color-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-letter {
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Black text for white/colorless circles */
.mtg-color-toggle[data-color="W"] .color-letter,
.mtg-color-toggle[data-color="C"] .color-letter {
    color: inherit;
    text-shadow: none;
}

.mtg-color-toggle.active .color-circle {
    border-color: #0073aa;
    transform: scale(1.05);
}

.mtg-color-toggle:not(.active) .color-circle {
    opacity: 0.4;
    filter: grayscale(50%);
}

/* ============================================
   CHECKBOX LISTS
   ============================================ */

.mtg-checkbox-list {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 8px;
}

.mtg-checkbox-list::-webkit-scrollbar {
    width: 6px;
}

.mtg-checkbox-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.mtg-checkbox-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.mtg-checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.mtg-filter-option {
    display: flex;
    align-items: center;
    padding: 8px 4px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 3px;
}

.mtg-filter-option:hover {
    background: #f9f9f9;
}

.mtg-filter-option input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.mtg-filter-option > span:first-of-type {
    flex: 1;
    font-size: 14px;
    /* color: #333; */
}

.filter-count {
    margin-left: 8px;
    color: #DF6F36;
    /* color: #999; */
    font-size: 13px;
    flex-shrink: 0;
}

/* ============================================
   SET SEARCH
   ============================================ */

.mtg-set-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 10px;
    font-size: 14px;
}

.mtg-set-search:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* ============================================
   VARIATION TOGGLE
   ============================================ */

.mtg-variation-toggle-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: none !important;
}

.mtg-variation-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 5px;
}

.mtg-variation-toggle-label input {
    margin-right: 10px;
    cursor: pointer;
}

.mtg-variation-toggle-label span {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.mtg-toggle-hint {
    margin: 0;
    padding-left: 28px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ============================================
   NO OPTIONS MESSAGE
   ============================================ */

.no-options {
    color: #999;
    font-style: italic;
    font-size: 14px;
    margin: 10px 0;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    .mtg-filters-widget {
        padding: 15px;
    }
    
    .mtg-filters-header h3 {
        font-size: 18px;
    }
    
    .color-circle {
        width: 36px;
        height: 36px;
    }
    
    .color-letter {
        font-size: 14px;
    }
    
    .mtg-checkbox-list {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .mtg-color-filters {
        gap: 6px;
    }
    
    .color-circle {
        width: 34px;
        height: 34px;
    }
    
    .mtg-filter-option {
        padding: 6px 4px;
    }
}
