/* =============================================
   Webshop Video Aggregator – Public Styles
   ============================================= */

:root {
    --wsv-primary: #2563eb;
    --wsv-yt-red: #ff0000;
    --wsv-border: #e2e8f0;
    --wsv-bg: #f8fafc;
    --wsv-white: #fff;
    --wsv-text: #1e293b;
    --wsv-muted: #64748b;
    --wsv-comment-bg: #fffbeb;
    --wsv-comment-border: #fcd34d;
    --wsv-radius: 12px;
    --wsv-shadow: 0 1px 3px rgba(0,0,0,.08);
    --wsv-shadow-hover: 0 8px 24px rgba(0,0,0,.12);
}

.wsv-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Filter bar */
.wsv-filter-bar {
    background: var(--wsv-white); border: 1px solid var(--wsv-border);
    border-radius: var(--wsv-radius); padding: 18px 20px;
    margin-bottom: 20px; box-shadow: var(--wsv-shadow);
}
.wsv-filter-inner { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wsv-search-input {
    flex: 1; min-width: 180px; padding: 9px 14px;
    border: 1px solid var(--wsv-border); border-radius: 8px;
    font-size: 14px; outline: none; transition: border-color .2s;
}
.wsv-search-input:focus { border-color: var(--wsv-primary); }
.wsv-select { padding: 9px 14px; border: 1px solid var(--wsv-border); border-radius: 8px; font-size: 14px; background: var(--wsv-white); }
.wsv-results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 13px; color: var(--wsv-muted); }
.wsv-last-fetch { font-size: 12px; }

/* Buttons */
.wsv-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 9px 18px; border-radius: 8px; font-size: 13px;
    font-weight: 600; cursor: pointer; border: none;
    text-decoration: none; transition: all .2s; white-space: nowrap;
}
.wsv-btn-primary { background: var(--wsv-primary); color: #fff; }
.wsv-btn-primary:hover { background: #1d4ed8; color: #fff; }
.wsv-btn-ghost { background: var(--wsv-bg); color: var(--wsv-muted); border: 1px solid var(--wsv-border); }
.wsv-btn-yt { background: var(--wsv-yt-red); color: #fff; font-size: 13px; padding: 8px 16px; }
.wsv-btn-yt:hover { background: #cc0000; color: #fff; }

/* Grid */
.wsv-grid { display: grid; gap: 24px; margin-bottom: 32px; }
.wsv-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wsv-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wsv-cols-1 { grid-template-columns: 1fr; }
@media (max-width: 960px) { .wsv-cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .wsv-cols-3, .wsv-cols-2 { grid-template-columns: 1fr; } }

/* Card */
.wsv-card {
    background: var(--wsv-white); border: 1px solid var(--wsv-border);
    border-radius: var(--wsv-radius); overflow: hidden;
    box-shadow: var(--wsv-shadow); transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column;
}
.wsv-card:hover { transform: translateY(-3px); box-shadow: var(--wsv-shadow-hover); }
.wsv-has-comment { border-left: 3px solid var(--wsv-comment-border); }

/* Player wrapper – 16:9 aspect ratio */
.wsv-player-wrap {
    position: relative;
    width: 100%;
    background: #000;
}

.wsv-thumbnail-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    cursor: pointer;
    overflow: hidden;
}
.wsv-thumbnail {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}
.wsv-thumbnail-wrap:hover .wsv-thumbnail { opacity: .85; }

/* YouTube play button */
.wsv-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: transparent; border: none;
    cursor: pointer; padding: 0;
    transition: transform .15s;
    z-index: 2;
    outline: none !important;
    box-shadow: none !important;
}
.wsv-play-btn:focus,
.wsv-play-btn:focus-visible,
.wsv-play-btn:active { outline: none !important; box-shadow: none !important; }
.wsv-play-btn:hover { transform: translate(-50%, -50%) scale(1.1); }
.wsv-play-bg { fill: rgba(33,33,33,.9); transition: fill .15s; }
.wsv-play-btn:hover .wsv-play-bg { fill: var(--wsv-yt-red); }
.wsv-play-arrow { fill: #fff; }

/* Iframe embed */
.wsv-iframe-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}
.wsv-iframe-wrap iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Card body */
.wsv-card-body { padding: 16px; flex: 1; }
.wsv-card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wsv-channel-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: #fef2f2; color: var(--wsv-yt-red);
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
    max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wsv-date { font-size: 12px; color: var(--wsv-muted); white-space: nowrap; }
.wsv-card-title { font-size: 15px; line-height: 1.4; margin: 0 0 8px; }
.wsv-card-title a { color: var(--wsv-text); text-decoration: none; }
.wsv-card-title a:hover { color: var(--wsv-primary); }
.wsv-card-excerpt { font-size: 13px; color: var(--wsv-muted); line-height: 1.5; margin-bottom: 12px; }

/* Editor comment */
.wsv-editor-comment {
    background: var(--wsv-comment-bg); border: 1px solid var(--wsv-comment-border);
    border-radius: 8px; padding: 10px 12px; margin-bottom: 12px;
}
.wsv-comment-label { display: block; font-size: 11px; font-weight: 700; color: #92400e; margin-bottom: 4px; }
.wsv-editor-comment p { margin: 0; font-size: 13px; color: #78350f; line-height: 1.5; }

.wsv-card-footer { padding: 12px 16px; border-top: 1px solid var(--wsv-border); }

/* Pagination */
.wsv-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.wsv-page-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--wsv-border); border-radius: 8px; font-size: 13px;
    font-weight: 600; text-decoration: none; color: var(--wsv-text); transition: all .2s;
}
.wsv-page-btn:hover, .wsv-page-btn.active { background: var(--wsv-primary); color: #fff; border-color: var(--wsv-primary); }

.wsv-empty {
    text-align: center; padding: 60px 20px;
    background: var(--wsv-bg); border-radius: var(--wsv-radius);
    color: var(--wsv-muted); font-size: 15px;
}
