/* ── Overlay ────────────────────────────────────────────────────────────── */
.cwt-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.cwt-overlay.is-open {
    display: block;
}

/* ── Side Panel ─────────────────────────────────────────────────────────── */
.cwt-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.cwt-panel.is-open {
    right: 0;
}

.cwt-panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Panel Header */
.cwt-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #1a3a6b;
    flex-shrink: 0;
}

.cwt-panel-header h3 {
    color: #fff;
    font-size: 20px;
    margin: 0;
}

.cwt-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s;
}

.cwt-panel-close:hover {
    opacity: 0.7;
}

/* Panel Scrollable Content */
.cwt-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Panel Section */
.cwt-panel-section {
    margin-bottom: 32px;
}

.cwt-panel-section:last-child {
    margin-bottom: 0;
}

.cwt-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1a3a6b;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

/* Panel Media Item */
.cwt-media-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.cwt-media-item:last-child {
    border-bottom: none;
}

.cwt-media-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 6px;
}

.cwt-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cwt-media-info {
    flex: 1;
    min-width: 0;
}

.cwt-media-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a6b;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cwt-media-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cwt-media-player {
    width: 100%;
}

/* Panel Footer */
.cwt-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.cwt-see-more {
    display: block;
    text-align: center;
    width: 100%;
}

/* Empty state */
.cwt-empty {
    color: #6b7280;
    font-size: 14px;
    padding: 16px 0;
}

/* ── Embed Wrappers ──────────────────────────────────────────────────────── */
.cwt-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
}

.cwt-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cwt-embed-wrapper.cwt-embed-spotify {
    padding-bottom: 80px;
}

.cwt-embed-wrapper.cwt-embed-soundcloud {
    padding-bottom: 120px;
}

.cwt-audio-player,
.cwt-video-player {
    width: 100%;
}

.cwt-fallback-link {
    color: #007db6;
    font-size: 14px;
}

.cwt-no-media {
    font-size: 13px;
    color: #9ca3af;
}

/* ── Full Page ───────────────────────────────────────────────────────────── */
.cwt-page {
    padding-top: 60px;
    padding-bottom: 80px;
}

/* Search */
.cwt-search-bar {
    margin-bottom: 48px;
}

.cwt-search-input-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    border: 2px solid #1a3a6b;
    border-radius: 4px;
    overflow: hidden;
}

.cwt-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 16px;
    color: #1a3a6b;
}

.cwt-search-btn {
    background: #1a3a6b;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.cwt-search-btn:hover {
    background: #007db6;
}

.cwt-search-clear {
    padding: 0 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.cwt-search-clear:hover {
    color: #dc1f34;
}

.cwt-search-info {
    margin-top: 10px;
    font-size: 14px;
    color: #6b7280;
}

/* Full Page Sections */
.cwt-full-section {
    margin-bottom: 64px;
}

.cwt-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    color: #1a3a6b;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid #1a3a6b;
}

/* Grid */
.cwt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Card */
.cwt-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.cwt-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.cwt-card--archived {
    opacity: 0.7;
}

.cwt-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.cwt-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cwt-card-body {
    padding: 16px;
}

.cwt-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a3a6b;
    margin: 0 0 8px;
}

.cwt-archived-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.cwt-card-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cwt-card-player {
    width: 100%;
}

/* Pagination */
.cwt-pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.cwt-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #1a3a6b;
    border-radius: 4px;
    color: #1a3a6b;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.cwt-page-btn:hover,
.cwt-page-btn.cwt-page-active {
    background: #1a3a6b;
    color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .cwt-panel {
        width: 100vw;
    }

    .cwt-grid {
        grid-template-columns: 1fr;
    }

    .cwt-section-heading {
        font-size: 22px;
    }

    .cwt-page {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    .cwt-search-input-wrap {
        max-width: 100%;
    }

    .cwt-pagination {
        justify-content: center;
    }
}