/*
 * Spinitron Station Display – default styles.
 * Override any value by redefining the custom properties on .ssd in your theme / Beaver Builder CSS, e.g.
 *   .ssd { --ssd-red: #c00; --ssd-link: #06c; --ssd-border: #999; --ssd-day-link: #c00; --ssd-btn: #1e88e5; }
 */
.ssd {
        --ssd-red: #b22234;
        --ssd-blue: #1e88e5;
        --ssd-link: #1a6fb5;
        --ssd-text: #333;
        --ssd-muted: #555;
        --ssd-border: #9a9a9a;
        --ssd-card-bg: transparent;
        --ssd-panel-bg: #ececec;
        --ssd-skel: #e2e2e2;
        --ssd-cols: 5;
        color: var(--ssd-text);
        box-sizing: border-box;
}
.ssd *, .ssd *::before, .ssd *::after { box-sizing: inherit; }
.ssd img { max-width: 100%; height: auto; display: block; }
.ssd-message { text-align: center; color: var(--ssd-muted); padding: 1.5em; }
.ssd-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ssd-icon { display: inline-block; flex: none; fill: currentColor; vertical-align: -.125em; }
.ssd-icon--broadcast { width: 1.15em; height: 1em; }

/* ---------- skeletons ---------- */
.ssd-skel { display: block; background: var(--ssd-skel); border-radius: 3px; animation: ssd-pulse 1.4s ease-in-out infinite; }
.ssd-skel--line { height: 1em; width: 70%; margin: .35em auto; }
.ssd-skel--small { height: .7em; width: 45%; margin: .35em auto; }
.ssd-skel--title { height: 2em; width: 80%; margin: 0 0 .6em; }
.ssd-skel--para { height: 5em; width: 100%; margin-top: .8em; }
.ssd-skel--img { width: 100%; aspect-ratio: 1 / 1; }
@keyframes ssd-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ssd-skel { animation: none; } }

/* ---------- schedule: day nav + all shows button ---------- */
.ssd-heading { text-align: center; font-weight: 400; margin: 0 0 .3em; }
.ssd-days ul { list-style: none; margin: 0 0 .9em; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .3em 1.6em; }
.ssd-days a { color: var(--ssd-day-link, var(--ssd-red)); font-size: 13px; text-decoration: none; }
.ssd-days a:hover, .ssd-days a:focus, .ssd-days a.is-active { text-decoration: underline; }
.ssd-days a.is-active { font-weight: 600; }
.ssd-all-btn-wrap { text-align: center; margin-bottom: 1.4em; }
.ssd-all-btn { display: inline-flex; align-items: center; gap: .5em; background: var(--ssd-btn, var(--ssd-blue)); color: var(--ssd-btn-text, #fff) !important; font-size: 13px; padding: .6em 1.3em; border-radius: 3px; text-decoration: none !important; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ssd-all-btn:hover, .ssd-all-btn:focus { filter: brightness(1.08); }
.ssd-grid-title { text-align: center; font-weight: 400; font-size: 1.35em; margin: 0 0 .8em; min-height: 1.3em; }

/* ---------- grid ----------
 * --ssd-cols is set per grid from the "Max number of columns" setting or the columns="" attribute;
 * it is a maximum that is reduced on narrower screens. */
.ssd-grid { display: grid; grid-template-columns: repeat(var(--ssd-cols), minmax(0, 1fr)); border-top: 1px solid var(--ssd-border); border-left: 1px solid var(--ssd-border); }
.ssd-card { background: var(--ssd-card-bg); border-right: 1px solid var(--ssd-border); border-bottom: 1px solid var(--ssd-border); padding: 14px 24px 16px; text-align: center; min-width: 0; }
.ssd-card p { margin: 0; }
.ssd-card__time { font-size: 15px; margin-bottom: 6px !important; }
.ssd-card__cat { font-size: 10px; color: var(--ssd-muted); margin-bottom: 10px !important; }
.ssd-card__media { display: block; aspect-ratio: 1 / 1; overflow: hidden; margin: 0 auto 14px; max-width: 220px; }
.ssd-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ssd-card__title { font-size: 15px; font-weight: 400; margin: 0 0 8px; line-height: 1.3; }
.ssd-card__title a { color: var(--ssd-link); text-decoration: underline; }
.ssd-card__hosts { font-size: 12px; color: var(--ssd-muted); }
.ssd-card.is-on-air { background: rgba(178, 34, 52, .05); }
.ssd-badge { display: inline-block; background: var(--ssd-red); color: #fff; font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 2px; vertical-align: middle; text-transform: uppercase; }
.ssd-sentinel { grid-column: 1 / -1; height: 1px; }

@media (max-width: 1100px) { .ssd-grid { grid-template-columns: repeat(min(var(--ssd-cols), 4), minmax(0, 1fr)); } }
@media (max-width: 860px) { .ssd-grid { grid-template-columns: repeat(min(var(--ssd-cols), 3), minmax(0, 1fr)); } }
@media (max-width: 600px) { .ssd-grid { grid-template-columns: repeat(min(var(--ssd-cols), 2), minmax(0, 1fr)); } .ssd-card { padding: 10px; } }
@media (max-width: 380px) { .ssd-grid { grid-template-columns: 1fr; } }

/* ---------- now playing ----------
 * Colors / sizes come from Settings → Spinitron Station Display → Now Playing (printed as custom
 * properties on .ssd-np); the fallbacks below match the default look. */
.ssd-np { color: var(--ssd-np-text, #333); }
.ssd-np__header { background: var(--ssd-np-header-bg, #000); color: var(--ssd-np-header-color, #fff); text-align: center; font-size: var(--ssd-np-header-size, 24px); letter-spacing: .02em; padding: 4px 10px; border-radius: 10px 10px 0 0; }
.ssd-np__body { background: var(--ssd-np-panel-bg, #ececec); padding: 14px 14px 26px; }
.ssd-np--no-header .ssd-np__body { border-radius: 10px; }
.ssd-np__card { background: var(--ssd-np-card-bg, #fafafa); border: 0; border-radius: 4px; padding: 18px 24px 22px; display: grid; grid-template-columns: minmax(0, 1fr) var(--ssd-np-img, 145px); gap: 10px 24px; align-items: center; }
.ssd-np--bordered .ssd-np__card { border: var(--ssd-np-border-width, 1px) solid var(--ssd-np-border-color, #777); }
.ssd-np--img-left .ssd-np__card { grid-template-columns: var(--ssd-np-img, 145px) minmax(0, 1fr); }
.ssd-np--img-left .ssd-np__media { grid-column: 1; grid-row: 1; }
.ssd-np--img-left .ssd-np__info { grid-column: 2; grid-row: 1; }
.ssd-np.ssd-np--no-image .ssd-np__card { grid-template-columns: minmax(0, 1fr); }
.ssd-np.ssd-np--no-image .ssd-np__info { grid-column: 1; }
.ssd-np__info { text-align: center; min-width: 0; }
.ssd-np__label { display: flex; align-items: center; justify-content: center; margin-bottom: .6em; }
.ssd .ssd-np__logo { display: block; width: auto; height: auto; max-width: min(300px, 100%); max-height: 50px; object-fit: contain; }
.ssd-np__title { color: var(--ssd-np-title-color, #b22234); font-size: var(--ssd-np-title-size, 20px); margin-bottom: .6em; }
.ssd-np__title a { color: inherit; text-decoration: none; }
.ssd-np__title a:hover, .ssd-np__title a:focus { text-decoration: underline; }
.ssd-np__episode { display: block; font-size: 14px; color: var(--ssd-np-text, #555); opacity: .85; }
.ssd-np__hosts { font-size: var(--ssd-np-host-size, 16px); margin-bottom: 1em; min-height: 1.2em; }
.ssd-np__media { aspect-ratio: 1 / 1; overflow: hidden; width: 100%; max-width: var(--ssd-np-img, 145px); }
.ssd-np__media img { width: 100%; height: 100%; object-fit: cover; }
.ssd-listen { display: inline-flex; align-items: center; justify-content: center; gap: .6em; border: 2px solid var(--ssd-np-link, #b22234); color: var(--ssd-np-link, #b22234) !important; text-decoration: none !important; font-size: 26px; letter-spacing: .18em; padding: 0 .8em; min-width: 9em; line-height: 1.3; }
.ssd-listen:hover, .ssd-listen:focus { background: var(--ssd-np-link, #b22234); color: var(--ssd-np-card-bg, #fff) !important; }
.ssd-listen__icon { width: 0; height: 0; border-style: solid; border-width: .38em 0 .38em .6em; border-color: transparent transparent transparent currentColor; }
.ssd-np__next { grid-column: 1 / -1; text-align: center; border-top: 1px solid rgba(0, 0, 0, .18); margin: 6px auto 0; padding-top: 14px; width: 60%; font-size: var(--ssd-np-next-size, 16px); }
.ssd-np__next:empty { display: none; }
.ssd-np__next a { color: var(--ssd-np-link, #b22234); text-decoration: none; }
.ssd-np__next a:hover, .ssd-np__next a:focus { text-decoration: underline; }
@media (max-width: 600px) {
        .ssd-np__card, .ssd-np--img-left .ssd-np__card { grid-template-columns: minmax(0, 1fr); }
        .ssd-np__media, .ssd-np--img-left .ssd-np__media { max-width: min(180px, var(--ssd-np-img, 145px)); margin: 0 auto; grid-column: 1; grid-row: 1; }
        .ssd-np--img-left .ssd-np__info { grid-column: 1; grid-row: auto; }
        .ssd-np__next { width: 100%; }
        .ssd-listen { font-size: 20px; }
}

/* ---------- building-block show fields ---------- */
/* Fields inherit the theme/builder typography; only the essentials are styled here. */
.ssd-field { color: inherit; }
.ssd-field .ssd-skel--line { display: inline-block; width: 12em; max-width: 100%; height: .9em; margin: 0; vertical-align: middle; }
.ssd-field .ssd-skel--img { display: block; }
.ssd-field--empty { display: none; }
.ssd-field--fallback { opacity: .85; }
.ssd-field__img { aspect-ratio: 1 / 1; object-fit: cover; }
.ssd-field__hosts--bio > * + * { margin-top: 1em; }
.ssd-field__hosts--image { display: flex; flex-wrap: wrap; gap: 1em; }
.ssd-field__hosts--image .ssd-field__img { display: block; max-width: 100%; height: auto; }
.ssd-social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: .5em 0; padding: 0; }
.ssd-social__link { display: inline-flex; width: 32px; height: 32px; border-radius: 6px; background: #555; color: #fff; align-items: center; justify-content: center; }
.ssd-social__link svg { width: 20px; height: 20px; fill: currentColor; }
.ssd-social--facebook { background: #3b5998; }
.ssd-social--instagram { background: #c13584; }
.ssd-social--x { background: #000; }
.ssd-social--spinitron { background: var(--ssd-red); }

/* ---------- fonts ----------
 * Set in Settings → Spinitron Station Display → Fonts (or per Beaver Builder module). The custom
 * properties exist only when a font is chosen; otherwise the theme font is inherited. */
.ssd-np { font-family: var(--ssd-np-font-body, inherit); font-weight: var(--ssd-np-body-weight, inherit); }
.ssd-np__header, .ssd-np__title, .ssd-listen { font-family: var(--ssd-np-font-heading, inherit); font-weight: var(--ssd-np-heading-weight, inherit); }
.ssd-schedule { font-family: var(--ssd-font-body, inherit); font-weight: var(--ssd-body-weight, inherit); }
.ssd-schedule .ssd-heading, .ssd-schedule .ssd-grid-title, .ssd-schedule .ssd-card__title { font-family: var(--ssd-font-heading, inherit); font-weight: var(--ssd-heading-weight, 400); }
