/* ==========================================================================
   Saxophone Catalogue — Front-end Styles  v1.1
   ========================================================================== */

/* ── Wrap ─────────────────────────────────────────────────────────────── */
.sax-cat-wrap,
.sax-archive-wrap,
.sax-single-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
    font-family: inherit;
}

/* ── Filter panel ─────────────────────────────────────────────────────── */
.sax-cat-filters {
    background: #f8f9fb;
    border: 1px solid #dde3ed;
    border-radius: 8px;
    padding: 1.4rem 1.6rem 1.2rem;
    margin-bottom: 1.6rem;
}

.sax-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.9rem 1.2rem;
    margin-bottom: 1rem;
}

.sax-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sax-filter-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sax-filter-select,
.sax-text-filter {
    width: 100%;
    padding: 0.42rem 0.6rem;
    border: 1px solid #ccd2dc;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
    color: #222;
    box-sizing: border-box;
}

.sax-filter-select:focus,
.sax-text-filter:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}

/* Media checkbox */
.sax-filter-media {
    margin: 0.6rem 0 1rem;
    font-size: 0.92rem;
    color: #333;
}

.sax-filter-media input[type="checkbox"] {
    margin-right: 0.4rem;
    accent-color: #1a73e8;
}

/* Action buttons */
.sax-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.sax-filter-btn {
    padding: 0.55rem 1.6rem;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.sax-filter-btn:hover { background: #1557b0; }

.sax-reset-btn {
    padding: 0.5rem 1rem;
    color: #555;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid #ccd2dc;
    border-radius: 5px;
    background: #fff;
    transition: background 0.15s;
}
.sax-reset-btn:hover { background: #f0f0f0; text-decoration: none; }

/* Prompt before search */
.sax-prompt {
    color: #666;
    font-style: italic;
    padding: 0.5rem 0 1rem;
    font-size: 0.95rem;
}

/* ── Result count ─────────────────────────────────────────────────────── */
.sax-result-count {
    font-size: 0.88rem;
    color: #666;
    margin: 0 0 1rem;
}

/* ── Piece list ───────────────────────────────────────────────────────── */
.sax-piece-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sax-piece-item {
    border: 1px solid #e4e8f0;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.75rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sax-piece-item:hover {
    border-color: #b3cdf8;
    box-shadow: 0 2px 8px rgba(26,115,232,0.08);
}

.sax-piece-item.has-media {
    border-left: 3px solid #1a73e8;
}

/* Title row */
.sax-piece-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.sax-piece-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}
.sax-piece-title:hover { color: #1a73e8; }

/* Media icons */
.sax-media-icon {
    display: inline-block;
    font-size: 0.8rem;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-style: normal;
    vertical-align: middle;
}
.sax-video-icon { background: #fce8e6; color: #c62828; }
.sax-audio-icon { background: #e8f5e9; color: #2e7d32; }

/* Composer / arranger */
.sax-piece-meta {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.5rem;
}
.sax-meta-arranger { color: #777; font-style: italic; }

/* Chips */
.sax-piece-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
}

.sax-chip {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.sax-chip--ens   { background: #e8f0fe; color: #1a56db; }
.sax-chip--cat   { background: #fef3c7; color: #92400e; }
.sax-chip--genre { background: #f3e8ff; color: #6b21a8; }
.sax-chip--instr { background: #f1f5f9; color: #374151; font-size: 0.75rem; }
.sax-chip--grade { background: #fef9c3; color: #713f12; }
.sax-chip--dur   { background: #f0fdf4; color: #14532d; }
.sax-chip--pub   { background: #fff7ed; color: #7c2d12; }

/* View details link */
.sax-piece-actions {
    margin-top: 0.2rem;
}

.sax-detail-btn {
    display: inline-block;
    font-size: 0.85rem;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}
.sax-detail-btn:hover { text-decoration: underline; }

/* Badges */
.sax-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
}
.sax-badge--pdf { background: #fee2e2; color: #b91c1c; }

/* ── No results ───────────────────────────────────────────────────────── */
.sax-no-results {
    color: #666;
    font-style: italic;
    padding: 1rem 0;
}

/* ── Pagination ───────────────────────────────────────────────────────── */
.sax-pagination {
    margin: 1.2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sax-page-btn {
    display: inline-block;
    padding: 0.38rem 0.8rem;
    border: 1px solid #ccd2dc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 0.88rem;
    background: #fff;
    transition: background 0.12s;
}
.sax-page-btn:hover { background: #f0f0f0; }
.sax-page-btn.sax-page-current {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

/* ── Single piece page ────────────────────────────────────────────────── */
.sax-single-wrap { padding: 1.5rem 1rem; }

.sax-single-title {
    font-size: 1.9rem;
    margin: 0 0 0.3rem;
    line-height: 1.25;
}

.sax-single-composer {
    font-size: 1.1rem;
    color: #444;
    margin: 0 0 0.8rem;
}

.sax-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.4rem;
}

.sax-badge--sax_category   { background: #fef3c7; color: #92400e; }
.sax-badge--sax_collection { background: #e8f0fe; color: #1a56db; }
.sax-badge--sax_ensemble   { background: #e6f4ea; color: #1a7340; }
.sax-badge--sax_genre      { background: #f3e8ff; color: #6b21a8; }

/* Two-column layout */
.sax-single-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media ( max-width: 700px ) {
    .sax-single-body { grid-template-columns: 1fr; }
}

.sax-meta-table { width: 100%; font-size: 0.9rem; border-collapse: collapse; }
.sax-meta-table th,
.sax-meta-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid #ebebeb;
    vertical-align: top;
}
.sax-meta-table th {
    text-align: left;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
    width: 45%;
}

.sax-single-content h3 {
    font-size: 1rem;
    color: #333;
    margin: 1.4rem 0 0.4rem;
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 0.25rem;
}
.sax-single-content h3:first-child { margin-top: 0; }

.sax-description,
.sax-notes { font-size: 0.92rem; line-height: 1.65; color: #333; }

/* Videos */
.sax-video-grid { display: flex; flex-wrap: wrap; gap: 1rem; }

.sax-video-wrap {
    flex: 1 1 300px;
    max-width: 540px;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 5px;
}

.sax-video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Audio */
.sax-audio-player { margin: 0.5rem 0; }
.sax-audio-player audio { width: 100%; max-width: 480px; }

/* Back link */
.sax-back-link { margin-top: 2rem; font-size: 0.9rem; }
.sax-back-link a { color: #1a73e8; text-decoration: none; }
.sax-back-link a:hover { text-decoration: underline; }

/* Archive title */
.sax-archive-title { font-size: 1.8rem; margin: 0 0 1rem; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
    .sax-filter-grid { grid-template-columns: 1fr 1fr; }
    .sax-piece-chips { gap: 0.25rem; }
}

@media ( max-width: 400px ) {
    .sax-filter-grid { grid-template-columns: 1fr; }
}
