/* Radyo paneli — composer overlay + mobil alt sayfa */
.radio-picker-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 4990;
}

.radio-picker-backdrop.open {
  display: block;
}

.composer-overlay-layer .radio-picker:not(.open),
#radioPicker:not(.open) {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.composer-overlay-layer .radio-picker-backdrop:not(.open) {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.radio-picker {
  display: none;
  position: relative;
  width: 100%;
  z-index: 301;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  flex-direction: column;
  overflow: hidden;
  height: min(55vh, 420px);
  max-height: min(55vh, 420px);
}

.radio-picker.open {
  display: flex;
}

body.radio-picker-open .composer-overlay-layer .radio-picker.open {
  z-index: 10002;
}

html.layout-compact .composer-overlay-layer .radio-picker.open,
html.layout-compact #radioPicker.open {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  transform: none !important;
  height: min(72dvh, 520px) !important;
  max-height: min(72dvh, 520px) !important;
  border-radius: 16px 16px 0 0 !important;
  z-index: 10002 !important;
}

html.layout-compact .radio-picker-backdrop.open {
  display: block;
  z-index: 10001;
}

.radio-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  background: #f0f2f5;
}

.radio-picker-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mid);
  margin-right: auto;
  margin-left: 8px;
}

.radio-picker-header button {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-mid);
  flex-shrink: 0;
}

.radio-player-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #1a237e 0%, #283593 100%);
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.radio-player-bar.is-visible {
  display: flex;
}

.radio-bar-play {
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-bar-play:hover {
  background: rgba(255, 255, 255, 0.32);
}

.radio-player-bar.needs-tap {
  cursor: pointer;
}

.radio-now-playing {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-now-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-now-type {
  font-size: 10px;
  opacity: 0.75;
}

.radio-bar-btn {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-bar-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.radio-volume {
  width: 72px;
  accent-color: #64b5f6;
  flex-shrink: 0;
}

.radio-player-bar.has-error .radio-now-type {
  color: #ffcdd2;
  font-size: 11px;
}

.radio-picker-search-wrap {
  flex-shrink: 0;
  padding: 8px 10px 0;
}

.radio-picker-search {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg-light);
}

.radio-picker-list {
  flex: 1 1 auto;
  min-height: 100px;
  overflow-y: auto;
  padding: 8px 10px 12px;
  -webkit-overflow-scrolling: touch;
}

.radio-picker-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-mid);
  font-size: 14px;
}

.radio-picker-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: var(--bg-light);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  text-align: left;
}

.radio-picker-item:hover,
.radio-picker-item.active {
  background: #e3f0ff;
  border-color: #bbdefb;
}

.radio-picker-item.is-playing-row {
  border-color: #1565c0;
  box-shadow: 0 0 0 1px rgba(21, 101, 192, 0.2);
}

.radio-picker-item-play {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1565c0;
}

.radio-picker-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-picker-name {
  font-weight: 600;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-picker-meta {
  font-size: 12px;
  color: var(--text-mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-default-tag {
  font-size: 10px;
  font-weight: 600;
  color: #1565c0;
  margin-left: 6px;
}

/* Composer mini çubuk */
.radio-composer-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 8px 6px;
  padding: 8px 10px;
  background: linear-gradient(90deg, #1a237e, #3949ab);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.radio-mini-play {
  flex-shrink: 0;
  display: flex;
}

.radio-mini-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.radio-mini-open {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.radio-mini-open:hover {
  background: rgba(255, 255, 255, 0.22);
}

.radio-assign-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.radio-assign-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-light);
  border-radius: 8px;
  cursor: pointer;
}

.radio-assign-item small {
  margin-left: auto;
  color: var(--mid);
  font-size: 11px;
}

.stream-url-cell {
  font-size: 11px;
  word-break: break-all;
  max-width: 280px;
  display: inline-block;
}

.row-inactive {
  opacity: 0.55;
}

.radio-bar-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
}

.radio-picker-item-logo,
.radio-logo-fallback {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1565c0;
}

.radio-picker-nowplaying {
  font-size: 12px;
  font-weight: 500;
  color: #1565c0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-picker-nowplaying-muted {
  color: var(--text-mid);
  font-weight: 400;
  opacity: 0.85;
}

.radio-composer-tip {
  position: fixed;
  z-index: 12050;
  top: 0;
  left: 0;
  transform: translate(-50%, -100%);
  transform-origin: bottom center;
  pointer-events: none;
  max-width: min(92vw, 280px);
}

.radio-composer-tip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: var(--bg-white, #fff);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}

.radio-composer-tip-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-white, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.radio-composer-tip-logo,
.radio-composer-tip .radio-logo-fallback {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-light);
}

.radio-composer-tip-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.radio-composer-tip-name {
  font-size: 13px;
  line-height: 1.25;
  color: var(--text-dark);
}

.radio-composer-tip-track {
  font-size: 12px;
  color: #1565c0;
  line-height: 1.3;
  word-break: break-word;
}

.radio-composer-tip-hint {
  font-size: 11px;
  color: var(--text-mid);
}

.radio-logo-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-light);
}

.radio-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.radio-logo-placeholder {
  font-size: 11px;
  color: var(--text-mid);
  text-align: center;
  padding: 4px;
}

.radio-admin-logo-preview img {
  border-radius: 6px;
  object-fit: cover;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .radio-composer-tip {
    max-width: min(94vw, 260px);
  }

  .radio-picker-item-logo,
  .radio-logo-fallback {
    width: 36px;
    height: 36px;
  }
}
