/* ── Base ──────────────────────────────────────────────────────────────────── */
.gwp-sermon-browser *,
.gwp-sermon-browser-results * { box-sizing: border-box; }

.gwp-sermon-browser {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
}

/* ── Filter bar ────────────────────────────────────────────────────────────── */
.gwp-filter-bar {
    background: #f8f9fb;
    border: 1px solid #e2e6ea;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
}
.gwp-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}
.gwp-filter-row-2 { margin-top: 10px; }

.gwp-filter-field { flex: 1; min-width: 140px; }
.gwp-filter-wide  { flex: 2; min-width: 200px; }
.gwp-filter-narrow { min-width: 120px; }

.gwp-filter-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 5px;
}
.gwp-filter-field select,
.gwp-filter-field input[type="text"],
.gwp-filter-field input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    background: #fff;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: auto;
}
.gwp-filter-field select:focus,
.gwp-filter-field input:focus {
    outline: none;
    border-color: #1e6d91;
    box-shadow: 0 0 0 3px rgba(30,109,145,0.12);
}

.gwp-filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding-bottom: 1px;
    flex-shrink: 0;
}
.gwp-btn-filter {
    background: #1e6d91;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}
.gwp-btn-filter:hover  { background: #155a7a; }
.gwp-btn-filter:active { transform: scale(0.97); }

.gwp-btn-reset {
    background: #fff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.gwp-btn-reset:hover { border-color: #9ca3af; color: #374151; }

/* ── Loading spinner ───────────────────────────────────────────────────────── */
.gwp-loading {
    display: none;
    text-align: center;
    padding: 48px 0;
    color: #9ca3af;
    font-size: 14px;
}
.gwp-loading::before {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border: 3px solid #e5e7eb;
    border-top-color: #1e6d91;
    border-radius: 50%;
    animation: gwp-spin 0.65s linear infinite;
}
@keyframes gwp-spin { to { transform: rotate(360deg); } }

/* ── Results header ────────────────────────────────────────────────────────── */
.gwp-results-header {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}
.gwp-results-count {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}
.gwp-no-results {
    color: #6b7280;
    font-size: 15px;
    padding: 32px 0;
    text-align: center;
}

/* ── Sermon cards ──────────────────────────────────────────────────────────── */
.gwp-sermon {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.gwp-sermon:hover {
    border-color: #c7d2dc;
    box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}

.gwp-sermon-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
}
.gwp-sermon-title a {
    color: #111827;
    text-decoration: none;
}
.gwp-sermon-title a:hover { color: #1e6d91; }

.gwp-sermon-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}
.gwp-meta-dot { color: #d1d5db; line-height: 1; }
.gwp-series-tag {
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 12px;
    font-weight: 500;
}

.gwp-sermon-passage {
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 10px;
}

/* ── Audio & files ─────────────────────────────────────────────────────────── */
.gwp-sermon-file { margin-top: 10px; }
.gwp-audio-player {
    display: block;
    width: 100%;
    max-width: 480px;
    height: 36px;
    margin-bottom: 6px;
}
.gwp-file-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gwp-download-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #1e6d91;
    text-decoration: none;
    border: 1px solid #1e6d91;
    border-radius: 5px;
    padding: 3px 10px;
    transition: all 0.15s;
}
.gwp-download-link:hover { background: #1e6d91; color: #fff; }
.gwp-duration { font-size: 12px; color: #9ca3af; }

/* ── Pagination ────────────────────────────────────────────────────────────── */
.gwp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 8px;
    flex-wrap: wrap;
}
.gwp-pagination a {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    color: #1e6d91;
    text-decoration: none;
    transition: all 0.15s;
    background: #fff;
}
.gwp-pagination a:hover { background: #1e6d91; color: #fff; border-color: #1e6d91; }
.gwp-page-info { font-size: 13px; color: #9ca3af; }

/* ── Single sermon ─────────────────────────────────────────────────────────── */
.gwp-sermon-browser-results { max-width: 700px; }
.gwp-sermon-browser-results h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 18px 0 12px;
    color: #111827;
    line-height: 1.3;
}
.gwp-back-link {
    display: inline-block;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 4px;
}
.gwp-back-link:hover { color: #1e6d91; }
.gwp-bible-passage { font-style: italic; color: #6b7280; font-size: 14px; margin-bottom: 12px; }
.gwp-sermon-description { font-size: 15px; line-height: 1.6; margin-bottom: 20px; color: #374151; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .gwp-filter-field,
    .gwp-filter-wide,
    .gwp-filter-narrow { min-width: 100%; }
    .gwp-filter-actions { width: 100%; }
    .gwp-btn-filter,
    .gwp-btn-reset { flex: 1; text-align: center; justify-content: center; }
    .gwp-sermon { padding: 16px; }
    .gwp-sermon-title { font-size: 15px; }
}
