/* =====================================================================
   Family Combo Size Filter — style.css
   Matches the combodress.com sidebar aesthetic
   ===================================================================== */

/* ── Container ──────────────────────────────────────────────────────── */
.fcsf-filter-wrap {
    font-family: inherit;
    width: 100%;
}

/* ── Each collapsible section ───────────────────────────────────────── */
.fcsf-section {
    border-bottom: 1px solid #e8e8e8;
    padding: 0;
}

/* ── Section header row ─────────────────────────────────────────────── */
.fcsf-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    cursor: pointer;
    user-select: none;
}

.fcsf-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.02em;
    text-transform: none;
}

.fcsf-toggle-icon {
    font-size: 18px;
    font-weight: 300;
    color: #666;
    line-height: 1;
    transition: transform 0.2s ease;
    min-width: 18px;
    text-align: center;
}

/* ── Section body (collapsible) ─────────────────────────────────────── */
.fcsf-section-body {
    display: none;
    padding-bottom: 16px;
}

.fcsf-section.fcsf-open .fcsf-section-body {
    display: block;
}

.fcsf-section.fcsf-open .fcsf-toggle-icon {
    content: '−';
}

/* ── Size grid — 2 per row matching the screenshot ──────────────────── */
.fcsf-size-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

/* ── Individual size label ──────────────────────────────────────────── */
.fcsf-size-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 2px 0;
}

.fcsf-size-label input[type="checkbox"] {
    display: none; /* hidden — we use the dot instead */
}

/* The circular radio-style dot */
.fcsf-size-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #c8c8c8;
    background: #f5f5f5;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    position: relative;
}

/* Inner fill dot when selected */
.fcsf-size-dot::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #1a1a1a;
    opacity: 0;
    transition: opacity 0.15s;
}

.fcsf-size-label.fcsf-checked .fcsf-size-dot {
    border-color: #1a1a1a;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

.fcsf-size-label.fcsf-checked .fcsf-size-dot::after {
    opacity: 1;
}

/* Hover */
.fcsf-size-label:hover .fcsf-size-dot {
    border-color: #888;
    background: #fff;
}

.fcsf-size-text {
    font-size: 13px;
    color: #333;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.fcsf-size-label.fcsf-checked .fcsf-size-text {
    font-weight: 600;
    color: #1a1a1a;
}

/* ── No sizes notice ────────────────────────────────────────────────── */
.fcsf-no-sizes {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* ── Loading state ──────────────────────────────────────────────────── */
.fcsf-filter-wrap.fcsf-loading {
    opacity: 0.55;
    pointer-events: none;
}

.fcsf-loading-indicator {
    display: none;
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    color: #888;
}

.fcsf-loading-indicator.fcsf-show {
    display: block;
}

/* Spinner */
.fcsf-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e0e0e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: fcsf-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes fcsf-spin {
    to { transform: rotate(360deg); }
}

/* ── Clear all button ───────────────────────────────────────────────── */
.fcsf-clear-wrap {
    padding: 16px 0 4px;
}

.fcsf-clear-btn {
    display: inline-block;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.15s;
}

.fcsf-clear-btn:hover {
    color: #c0392b;
    text-decoration: none;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .fcsf-size-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
