.tvp-radio-page {
  --tvp-radio-surface: #ffffff;
  --tvp-radio-surface-muted: #f4f8ff;
  --tvp-radio-surface-soft: #edf4ff;
  --tvp-radio-border: #d8e5f3;
  --tvp-radio-border-strong: #abc3df;
  --tvp-radio-text: #112235;
  --tvp-radio-text-muted: #55697e;
  --tvp-radio-title: #071423;
  --tvp-radio-accent: #0c76da;
  --tvp-radio-accent-strong: #0958ab;
  --tvp-radio-live: #e24458;
  --tvp-radio-live-strong: #b62137;
  --tvp-radio-warning: #c47a13;
  --tvp-radio-success: #0b9368;
  --tvp-radio-focus: #0c76da;
  --tvp-radio-shadow: 0 18px 40px rgb(7 20 35 / 0.08);
  --tvp-radio-shadow-hover: 0 24px 48px rgb(7 20 35 / 0.14);

  position: relative;
  color: var(--tvp-radio-text);
  min-width: 0;
  max-width: 100%;
}

.tvp-radio-shell {
  display: grid;
  gap: 1rem;
}

.tvp-radio-inline-slot {
  width: min(100%, 300px);
  margin: 0.82rem auto 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tvp-radio-inline-slot > * {
  max-width: 100%;
}

.tvp-radio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.82rem;
  align-items: start;
}

.tvp-radio-layout-main,
.tvp-radio-layout-side {
  min-width: 0;
}

.tvp-radio-layout-side-sticky {
  position: static;
}

.tvp-radio-layout-side .tvp-radio-inline-slot {
  margin-top: 0;
}

.tvp-radio-alert,
.tvp-radio-player-card,
.tvp-radio-library {
  border: 1px solid var(--tvp-radio-border);
  border-radius: 1.2rem;
  box-shadow: var(--tvp-radio-shadow);
}

.tvp-radio-alert {
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #fff4ea 0%, #fffaf4 100%);
  color: #9d3f12;
  padding: 0.95rem 1rem;
}

.tvp-radio-panel-label {
  margin: 0;
  color: var(--tvp-radio-text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.tvp-radio-panel-title {
  margin: 0.15rem 0 0;
  color: var(--tvp-radio-title);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.3;
}

.tvp-radio-card:focus-visible,
.tvp-radio-player-btn:focus-visible {
  outline: 2px solid var(--tvp-radio-focus);
  outline-offset: 3px;
}

.tvp-radio-player-card {
  padding: 1rem;
  background: var(--tvp-radio-surface);
}

.tvp-radio-player-head,
.tvp-radio-library-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

.tvp-radio-player-head {
  align-items: flex-start;
}

.tvp-radio-library-head {
  align-items: flex-end;
}

.tvp-radio-player-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.tvp-radio-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.1rem;
  margin-left: auto;
  align-self: flex-start;
  border: 1px solid var(--tvp-radio-border-strong);
  border-radius: 999px;
  background: var(--tvp-radio-surface-muted);
  color: var(--tvp-radio-text);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.42rem 0.82rem;
}

.tvp-radio-live-pill::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--tvp-radio-text-muted);
}

.tvp-radio-live-pill.is-live {
  border-color: rgb(226 68 88 / 0.22);
  background: rgb(226 68 88 / 0.08);
  color: var(--tvp-radio-live-strong);
}

.tvp-radio-live-pill.is-live::before {
  background: var(--tvp-radio-live);
  box-shadow: 0 0 0 0 rgb(226 68 88 / 0.34);
  animation: tvp-radio-pulse 1.8s ease-out infinite;
}

.tvp-radio-live-pill.is-loading {
  border-color: rgb(245 158 11 / 0.3);
  background: rgb(245 158 11 / 0.08);
  color: #9a6708;
}

.tvp-radio-live-pill.is-loading::before {
  background: #f59e0b;
}

.tvp-radio-live-pill.is-error {
  border-color: rgb(248 113 113 / 0.28);
  background: rgb(248 113 113 / 0.08);
  color: #b42318;
}

.tvp-radio-live-pill.is-error::before {
  background: #ef4444;
}

.tvp-radio-player-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.tvp-radio-player-btn {
  display: inline-grid;
  justify-items: center;
  align-content: center;
  gap: 0.24rem;
  width: 5.15rem;
  height: 5.15rem;
  border: 0;
  border-radius: 1.45rem;
  background: linear-gradient(145deg, var(--tvp-radio-accent) 0%, #4ca7ff 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 18px 30px rgb(12 118 218 / 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.tvp-radio-player-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 34px rgb(12 118 218 / 0.34);
}

.tvp-radio-player-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}

.tvp-radio-player-btn.is-playing {
  background: linear-gradient(145deg, var(--tvp-radio-live) 0%, #ff7d8e 100%);
  box-shadow: 0 18px 30px rgb(226 68 88 / 0.28);
}

.tvp-radio-player-btn.is-loading {
  background: linear-gradient(145deg, #f59e0b 0%, #d97706 100%);
}

.tvp-radio-player-btn.is-loading .tvp-radio-player-icon {
  animation: tvp-radio-breathe 1.1s ease-in-out infinite alternate;
}

.tvp-radio-player-btn.is-error {
  background: linear-gradient(145deg, #c96a12 0%, #e38b2c 100%);
  box-shadow: 0 18px 30px rgb(201 106 18 / 0.24);
}

.tvp-radio-player-icon {
  display: inline-flex;
  width: 1.55rem;
  height: 1.55rem;
}

.tvp-radio-player-icon svg {
  width: 100%;
  height: 100%;
}

.tvp-radio-player-btn .tvp-radio-player-icon--pause {
  display: none;
}

.tvp-radio-player-btn.is-playing .tvp-radio-player-icon--play {
  display: none;
}

.tvp-radio-player-btn.is-playing .tvp-radio-player-icon--pause {
  display: inline-flex;
}

.tvp-radio-player-btn-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tvp-radio-player-copy {
  min-width: 0;
}

.tvp-radio-status {
  margin: 0.36rem 0 0;
  color: var(--tvp-radio-title);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
}

.tvp-radio-status.is-live {
  color: var(--tvp-radio-live-strong);
}

.tvp-radio-status.is-error {
  color: #9d3f12;
}

.tvp-radio-player-audio {
  display: none;
}

.tvp-radio-player-fallback {
  width: 100%;
  margin-top: 1rem;
}

.tvp-radio-library {
  padding: 1.05rem;
  background: var(--tvp-radio-surface);
}

.tvp-radio-section-title {
  margin: 0;
  color: var(--tvp-radio-title);
  font-size: 1.14rem;
  font-weight: 850;
}

.tvp-radio-section-note {
  margin: 0.18rem 0 0;
  color: var(--tvp-radio-text-muted);
  font-size: 0.88rem;
  line-height: 1.58;
}

.tvp-radio-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border: 1px solid var(--tvp-radio-border-strong);
  border-radius: 999px;
  background: var(--tvp-radio-surface);
  color: var(--tvp-radio-text);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.42rem 0.8rem;
}

.tvp-radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-top: 0.95rem;
}

.tvp-radio-card-item {
  min-width: 0;
}

.tvp-radio-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.92rem;
  min-height: 5.9rem;
  border: 1px solid var(--tvp-radio-border);
  border-radius: 1rem;
  background: var(--tvp-radio-surface-muted);
  box-shadow: var(--tvp-radio-shadow);
  color: inherit;
  text-decoration: none;
  padding: 0.88rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tvp-radio-card:hover {
  color: inherit;
  border-color: var(--tvp-radio-accent);
  transform: translateY(-2px);
  box-shadow: var(--tvp-radio-shadow-hover);
}

.tvp-radio-card.is-active {
  border-color: rgb(226 68 88 / 0.18);
  background: rgb(255 246 247);
}

.tvp-radio-card-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, var(--tvp-radio-accent) 0%, #41a0ff 100%);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
}

.tvp-radio-card.is-active .tvp-radio-card-mark {
  background: linear-gradient(145deg, var(--tvp-radio-live) 0%, #ff7d8e 100%);
}

.tvp-radio-card-mark.has-logo,
.tvp-radio-player-logo.has-logo {
  background: #ffffff;
  padding: 0.35rem;
}

.tvp-radio-player-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7.2rem;
  height: 7.2rem;
  flex: 0 0 auto;
  border-radius: 1.4rem;
  background: linear-gradient(145deg, var(--tvp-radio-accent) 0%, #41a0ff 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
}

.tvp-radio-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tvp-radio-card-body {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 100%;
}

.tvp-radio-card-header {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.tvp-radio-card-title {
  display: block;
  color: var(--tvp-radio-title);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.3;
  text-wrap: balance;
}

.tvp-radio-empty {
  margin: 0.95rem 0 0;
  border: 1px dashed var(--tvp-radio-border-strong);
  border-radius: 1rem;
  background: var(--tvp-radio-surface);
  color: var(--tvp-radio-text-muted);
  text-align: center;
  padding: 1rem;
}

@keyframes tvp-radio-pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(226 68 88 / 0.3);
  }

  70% {
    box-shadow: 0 0 0 10px rgb(226 68 88 / 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgb(226 68 88 / 0);
  }
}

@keyframes tvp-radio-breathe {
  from {
    transform: scale(0.9);
  }

  to {
    transform: scale(1.08);
  }
}

:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page {
  --tvp-radio-surface: #142234;
  --tvp-radio-surface-muted: #102031;
  --tvp-radio-surface-soft: #18304b;
  --tvp-radio-border: #32475f;
  --tvp-radio-border-strong: #526b88;
  --tvp-radio-text: #e7eff8;
  --tvp-radio-text-muted: #bfd0e3;
  --tvp-radio-title: #f5f9ff;
  --tvp-radio-accent: #78b4ff;
  --tvp-radio-accent-strong: #a6ceff;
  --tvp-radio-live: #ff7e8d;
  --tvp-radio-live-strong: #ffc1ca;
  --tvp-radio-success: #5de3b4;
  --tvp-radio-focus: #a6ceff;
  --tvp-radio-shadow: 0 20px 40px rgb(3 8 15 / 0.36);
  --tvp-radio-shadow-hover: 0 26px 50px rgb(3 8 15 / 0.48);
}

:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page .tvp-radio-alert {
  background: linear-gradient(135deg, rgb(157 63 18 / 0.26) 0%, rgb(85 42 15 / 0.3) 100%);
  color: #ffd8b0;
}

:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page .tvp-radio-player-card,
:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page .tvp-radio-library,
:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page .tvp-radio-card,
:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page .tvp-radio-count-badge {
  background-color: rgb(9 17 29 / 0.72);
}

:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page .tvp-radio-card.is-active {
  background: rgb(40 20 27 / 0.9);
}

:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page .tvp-radio-card-mark.has-logo,
:is(html[data-theme="dark"], html.dark, body.dark-mode, body.dark-theme) .tvp-radio-page .tvp-radio-player-logo.has-logo {
  background: #ffffff;
}

@media (min-width: 980px) {
  .tvp-radio-library {
    padding: 1.2rem;
  }
}

@media (min-width: 992px) {
  .tvp-radio-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: stretch;
  }

  .tvp-radio-layout.is-no-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .tvp-radio-layout-side {
    align-self: stretch;
  }

  .tvp-radio-layout-side-sticky {
    width: 100%;
  }

  .tvp-radio-layout-side .tvp-radio-inline-slot {
    margin: 0 0 0 auto;
  }
}

@media (max-width: 767.98px) {
  .tvp-radio-player-card,
  .tvp-radio-library {
    padding: 0.95rem;
  }

  .tvp-radio-player-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .tvp-radio-player-btn {
    width: 4.6rem;
    height: 4.6rem;
  }

  .tvp-radio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .tvp-radio-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: center;
    gap: 0.65rem;
    min-height: 0;
    text-align: center;
  }

  .tvp-radio-card-body,
  .tvp-radio-card-header {
    justify-content: center;
  }

  .tvp-radio-card-title {
    font-size: 0.92rem;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .tvp-radio-card {
    min-height: 0;
    padding: 0.82rem;
  }

  .tvp-radio-card-mark {
    width: 3.1rem;
    height: 3.1rem;
  }

  .tvp-radio-player-logo {
    width: 5.8rem;
    height: 5.8rem;
  }

}
