/* ── Webcam Area Section ────────────────────────────────────── */

.wca-full-row { grid-column: 1 / -1; }

.wca-panel { max-width: 100%; }

.wca-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wca-clear-btn {
    background: none;
    border: 1px solid var(--fg-inv);
    color: var(--fg-inv);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: none;
    padding: 3px 8px;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s;
}
.wca-clear-btn:hover { opacity: 1; }

.wca-panel-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.wca-map-wrap {
    width: 100%;
    background: #ece9e0;
    border-bottom: 1px solid var(--border-3);
    line-height: 0;
}

/* ── Viewer ─────────────────────────────────────────────────── */

.wca-viewer {
    padding: 16px;
    min-height: 80px;
}

.wca-viewer-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--fg-3);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.wca-viewer-inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* ── Featured webcam ────────────────────────────────────────── */

.wca-featured {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wca-featured-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-inset);
    overflow: hidden;
    border-radius: 1px;
}

.wca-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wca-featured-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wca-meta-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: 0.3px;
}
.wca-meta-name:hover { text-decoration: underline; }

.wca-meta-loc {
    font-size: 0.72rem;
    color: var(--fg-3);
}

.wca-dir-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    background: var(--bg-inset);
    color: var(--fg-2);
    border-radius: 2px;
    white-space: nowrap;
}

.wca-windy-link {
    font-size: 0.65rem;
    color: var(--fg-3);
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}
.wca-windy-link:hover { color: var(--fg); }

/* ── Thumbnails strip ───────────────────────────────────────── */

.wca-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 130px;
    flex-shrink: 0;
}

.wca-thumb {
    position: relative;
    cursor: pointer;
    border-radius: 1px;
    overflow: hidden;
    border: 1px solid var(--border-3);
    transition: border-color 0.15s;
    background: var(--bg-inset);
}
.wca-thumb:hover { border-color: var(--border-2); }

.wca-thumb-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.wca-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wca-thumb-label {
    padding: 4px 6px 5px;
    font-size: 0.6rem;
    color: var(--fg-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    background: var(--bg-surface);
}

/* ── Close buttons ──────────────────────────────────────────── */

.wca-close {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 0.87rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.wca-featured-img-wrap:hover .wca-close,
.wca-thumb:hover .wca-close { opacity: 1; }

.wca-num-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green-fg);
    border: 1.5px solid var(--bg-surface);
    color: var(--bg-surface);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.67rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ── Tooltip ─────────────────────────────────────────────────── */

.webcam-map-tooltip {
    position: fixed;
    z-index: 9000;
    display: none;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-emphasis);
    color: var(--fg-inv);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    line-height: 1.4;
    padding: 7px 11px;
    border-radius: var(--radius);
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.wctt-name { font-weight: 700; font-size: 0.72rem; }
.wctt-loc  { font-size: 0.62rem; opacity: 0.65; }

.wc-map-controls {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    pointer-events: none;
    background: var(--bg-emphasis, #222);
    padding: 10px 10px;
    border-radius: var(--radius);
}
.wc-map-controls span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--fg-inv, #fff);
    white-space: nowrap;
    text-transform: lowercase;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 600px) {
    .wca-viewer-inner {
        flex-direction: column;
    }
    .wca-thumbs {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }
    .wca-thumb {
        flex: 0 0 110px;
    }
}
