/**
 * Right Sidebar component styles.
 * Right sidebar with ad placement and app download buttons.
 * Used on radio detail and podcast detail pages.
 */

.right-sidebar {
  width: calc(336px + (2 * var(--space-md)) + 1px);
  background-color: var(--color-bg);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  overflow: visible;
  flex-shrink: 0;
  contain: none;
  border-radius: 16px 0 0 16px;
}

.right-sidebar__inner {
  height: 100%;
  width: 336px;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Ad Placement */
.right-sidebar__ad {
  color: var(--color-ad-text);
  border-radius: var(--radius-md);
  text-align: center;
  min-height: 250px;
  max-height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  contain: layout paint style;
}

.right-sidebar__ad-content {
  display: block;
  width: 100%;
}

.right-sidebar__ad-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Section */
.right-sidebar__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* App Download Section */
.right-sidebar__app-download {
  margin-top: auto;
  padding: var(--space-md);
  background-color: var(--color-bg-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.right-sidebar__app-download__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.right-sidebar__app-download__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
}

.right-sidebar__app-download__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.right-sidebar__app-download__buttons {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.right-sidebar__app-download__button {
  flex: 1 1 140px;
  display: flex;
  justify-content: center;
  transition: opacity var(--transition-fast);
}

.right-sidebar__app-download__button:hover {
  opacity: 0.8;
}

.right-sidebar__app-download__button img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 220px;
}

/* Legacy app download ad (desktop right sidebar) */
.app-ad-container-desktop {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-bg-muted);
  border-radius: 12px;
  width: 100%;
  text-align: center;
}

.app-ad-container-desktop .top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.app-ad-container-desktop .top span {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #111;
}

[data-theme="dark"] .app-ad-container-desktop .top span {
  color: var(--color-text);
}

.app-ad-container-desktop .app-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.app-ad-container-desktop .bottom {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.app-ad-container-desktop .bottom a {
  flex: 1 1 140px;
  display: flex;
  justify-content: center;
}

.app-ad-container-desktop .store-logo {
  width: 100%;
  height: auto;
  display: block;
  max-width: 220px;
}

.app-ad-container-desktop .store-logo:hover {
  opacity: 0.8;
}

/* Sticky ad wrapper */
.right-sidebar__sticky {
  position: sticky;
  top: var(--space-lg);
  align-self: stretch;
  contain: none;
}

/* Responsive: Hide right sidebar on mobile and "tablet-ish" widths */
@media (max-width: 1350px) {
  .right-sidebar {
    display: none;
  }
}

