/* BBC Event Calendar View */
.bbc-ecv-wrap { --bbc-gap:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }

/* Header */
.bbc-ecv-header { display:flex; align-items:center; justify-content:space-between; margin:8px 0 14px; }
.bbc-ecv-title { font-size:2.5rem; font-weight:700; color:#ff0000; }
.bbc-ecv-nav { display:inline-block; background:#ff0000; color:#fff; text-decoration:none; padding:6px 14px; border-radius:6px; font-size:1rem; font-weight:600; }
.bbc-ecv-nav:hover { background:#cc0000; color:#fff; }

/* Grid */
.bbc-ecv-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:0; border:2px solid #ff0000; border-right:none; border-bottom:none; }
.bbc-ecv-head { font-weight:700; text-transform:uppercase; font-size:1rem; letter-spacing:.04em; color:#000; text-align:center; border-right:2px solid #ff0000; border-bottom:2px solid #ff0000; background:#fff; padding:10px 0; }

/* Cells */
.bbc-ecv-cell { position:relative; border-right:2px solid #ff0000; border-bottom:2px solid #ff0000; min-height:160px; overflow:hidden; background:#fff; }
.bbc-ecv-cell.empty { background:#fff; }
.bbc-ecv-cell.has-event { color:#fff; background-color:#000; background-image:var(--bg); background-size:cover; background-position:center; background-repeat:no-repeat; }
.bbc-ecv-cell.has-event .bbc-ecv-cell-overlay { position:absolute; inset:0; background:rgba(0,0,0,0.50); pointer-events:none; }

/* Day number */
.bbc-ecv-daynum { position:absolute; top:8px; left:10px; z-index:2; font-size:1.1rem; font-weight:700; color:#333; text-shadow:0 1px 2px rgba(0,0,0,.3); }
.bbc-ecv-cell.has-event .bbc-ecv-daynum { color:#fff; }

/* Events container */
.bbc-ecv-events { display:flex; flex-direction:column; gap:3px; margin-top:32px; padding:0 6px 6px; position:relative; z-index:2; }

/* Individual event link */
.bbc-ecv-event { display:block; padding:4px 6px; border-radius:4px; text-decoration:none; color:inherit; background:rgba(0,0,0,0.08); line-height:1.2; }
.bbc-ecv-event:hover { text-decoration:underline; }
.bbc-ecv-event.no-link { cursor:default; }

/* Event title */
.bbc-ecv-event-title { display:block; font-size:0.95rem; font-weight:700; line-height:1.2; margin-bottom:1px; }

/* Event time */
.bbc-ecv-event-time { display:block; font-size:0.82rem; font-weight:500; line-height:1.15; margin-top:0; margin-bottom:0; opacity:0.9; letter-spacing:0.01em; }

.bbc-ecv-cell.has-event .bbc-ecv-event-title,
.bbc-ecv-cell.has-event .bbc-ecv-event-time { color:#fff; }
.bbc-ecv-cell:not(.has-event) .bbc-ecv-event-title { color:#111; }
.bbc-ecv-cell:not(.has-event) .bbc-ecv-event-time { color:#444; }

/* No events message */
.bbc-ecv-no-events { display:none; font-size:1rem; font-weight:500; margin-bottom:8px; }

/* Responsive */
@media (max-width:900px) {
  .bbc-ecv-cell { min-height:120px; }
  .bbc-ecv-event-title { font-size:0.88rem; }
  .bbc-ecv-event-time { font-size:0.78rem; }
  .bbc-ecv-title { font-size:2rem; }
}
@media (max-width:700px) {
  .bbc-ecv-grid { grid-template-columns:repeat(2,1fr); }
  .bbc-ecv-head { display:none; }
  .bbc-ecv-title { font-size:1.6rem; }
  .bbc-ecv-cell:not(.has-event) { display:none; }
  .bbc-ecv-no-events { display:block; }
  .bbc-ecv-event-title { font-size:0.95rem; }
  .bbc-ecv-event-time { font-size:0.82rem; }
}

/* ── Band rows inside calendar cells ──────────────────────── */
.bbc-ecv-event-bands {
    margin-top: 2px;
    padding-top: 0;
    border-top: 1px solid rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.bbc-ecv-cell:not(.has-event) .bbc-ecv-event-bands {
    border-top-color: rgba(0,0,0,0.25);
}

.bbc-ecv-band-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    line-height: 1.3;
}

.bbc-ecv-band-name {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bbc-ecv-band-time {
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.78;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Band-only cell */
.bbc-ecv-event.bbc-ecv-band-only {
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bbc-ecv-event.bbc-ecv-band-only .bbc-ecv-band-name {
    font-size: 0.82rem;
}
.bbc-ecv-event.bbc-ecv-band-only .bbc-ecv-band-time {
    font-size: 0.72rem;
}
.bbc-ecv-no-bands {
    font-size: 0.78rem;
    font-style: italic;
    opacity: 0.7;
}

/* Color overrides for has-event cells */
.bbc-ecv-cell.has-event .bbc-ecv-band-name,
.bbc-ecv-cell.has-event .bbc-ecv-band-time { color: #fff; }
.bbc-ecv-cell:not(.has-event) .bbc-ecv-band-name { color: #111; }
.bbc-ecv-cell:not(.has-event) .bbc-ecv-band-time { color: #444; }

@media (max-width:900px) {
    .bbc-ecv-band-name { font-size: 0.72rem; }
    .bbc-ecv-band-time { font-size: 0.65rem; }
}

/* ── Band profile links in calendar cells ─────────────────── */
a.bbc-ecv-band-link {
    text-decoration: none;
    color: inherit;
}
a.bbc-ecv-band-link:hover {
    text-decoration: underline;
    opacity: 1;
}
