/* ======================================================
   GLOBAL RESET (SAFE)
====================================================== */

* {
  box-sizing: border-box;
}

/* ======================================================
   SCS RADIO DJ BASE (SCOPED)
====================================================== */

.scs-radiodj {
  --scs-bg: #ffffff;
  --scs-bg-alt: #f9fafb;
  --scs-text: #111827;
  --scs-text-alt: #ffffff;
  --scs-muted: #6b7280;
  --scs-border: #e5e7eb;
  --scs-accent: #2563eb;

  color: var(--scs-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ======================================================
   NOW PLAYING
====================================================== */

.scs-now-playing {
  position: relative;
  background: transparent;
  padding: 4px;
  margin-bottom: 14px;
}

/* Inner layout: art | meta */
.scs-now-playing__inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

/* Album art */
.scs-now-playing__art {
  width: 100px;
  height: 100px;
  background: #000000;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scs-now-playing__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Meta container */
.scs-now-playing__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

/* Title */
.scs-now-playing__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--scs-text, #111827);
}

/* Artist */
.scs-now-playing__artist {
  font-size: 13px;
  color: var(--scs-text, #111827);
}
.scs-now-playing__type {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--scs-muted, #6b7280);
}
/* =====================================
   REQUEST INFO
===================================== */

.scs-now-playing__request {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--scs-border, #e5e7eb);
  font-size: 13px;
}

.scs-now-playing__request-name {
  color: var(--scs-muted, #6b7280);
  font-weight: 600;
}

.scs-now-playing__request-message {
  margin-top: 2px;
  font-style: italic;
  color: var(--scs-muted, #6b7280);
  opacity: 0.9;
}

/* ======================================================
   UPCOMING TRACKS
====================================================== */

.scs-upcoming__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Row */
.scs-upcoming__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--scs-border, #e5e7eb);
  min-height: 56px;
  background: transparent;
}

.scs-upcoming__item:last-child {
  border-bottom: none;
}

/* ======================================================
   COVER (ART + ETA)
====================================================== */

.scs-upcoming__cover {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
  background: #000;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scs-upcoming__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ETA badge */
.scs-upcoming__eta {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 10px;
  line-height: 1;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #b5b5b5;
  border-radius: 2px;
  white-space: nowrap;
}

/* ======================================================
   META (TITLE + ARTIST)
====================================================== */

.scs-upcoming__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* Track title */
.scs-upcoming__track {
  font-size: 18px;
  font-weight: 600;
  color: var(--scs-text, #111827);
  line-height: 1.2;
}

/* Artist */
.scs-upcoming__artist {
  font-size: 14px;
  color: var(--scs-text, #111827);
  line-height: 1.2;
}

/* ======================================================
   RECENTLY PLAYED (legacy recent box)
====================================================== */

.scs-recent {
  padding: 12px;
}

/* Row card */
.rp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--scs-border, #e5e7eb);
  min-height: 56px;
}

.rp-card:last-child {
  border-bottom: none;
}

/* =====================================
   ALBUM ART
===================================== */

.rp-cover {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: #000;
  border-radius: 2px;
}

/* =====================================
   META (ARTIST + TITLE)
===================================== */

.rp-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

/* Artist */
.rp-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--scs-text, #111827);
  line-height: 1.2;
}

/* Title */
.rp-sub {
  margin: 0;
  font-size: 13px;
  color: var(--scs-text, #111827);
  line-height: 1.2;
}

/* =====================================
   TIME (RIGHT ALIGNED)
===================================== */

.rp-menu {
  font-size: 12px;
  color: var(--scs-muted, #6b7280);
  white-space: nowrap;
  margin-left: auto;
}

/* ======================================================
   REQUEST BROWSER (MAIN LIST)
====================================================== */

.scs-request-browser {
  margin: 0 auto;
  border: 1px solid var(--scs-border, #e5e7eb);
}

/* single row */
.scs-request-song {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 12px;
  background: var(--scs-bg);
  border-bottom: 1px solid var(--scs-border);
}

/* alternating rows */
.scs-request-song:nth-child(even) {
  background: var(--scs-bg-alt);
}

.scs-request-song:last-child {
  border-bottom: none;
}

.scs-request-title {
  flex: 1;
  font-size: 14px;
  color: var(--scs-text, #111827);
}

.scs-requests-disabled {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 14px;
}

.scs-requests-off .scs-request-btn {
  opacity: 0.45;
  cursor: not-allowed;
}
/* ======================================================
   REQUEST BUTTON
====================================================== */

.scs-request-btn {
  background: var(--scs-accent, #b9c9ea);
  color: var(--scs-text-alt, #ffffff);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;

  padding: 5px 10px;
  border: 1px solid var(--scs-accent, #b9c9ea);

  cursor: pointer;
}

.scs-request-btn:hover {
  filter: brightness(0.9);
}

.scs-request-btn:disabled {
  background: #e8bbbb;
  border-color: #e8bbbb;
  cursor: not-allowed;
}

/* ======================================================
   PAGINATION
====================================================== */

.scs-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 12px;
}

.scs-pana {
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
  background: #ecebeb;
  color: #111827;
}

.scs-pana.current {
  background: #d9ddea;
  color: #787878;
  border-color: #ecebeb;
  font-weight: 600;
}
/* ======================================================
   REQUEST MODAL
====================================================== */

.scs-request-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}

.scs-request-modal.show {
  display: block;
}

.scs-request-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.scs-request-modal__box {
  position: relative;
  max-width: 420px;
  margin: 10vh auto;
  background: var(--scs-bg, #ffffff);
  padding: 16px;
  border: 1px solid var(--scs-border, #e5e7eb);
  color: var(--scs-text, #111827);
  border-radius: 8px;
}

.scs-request-modal__box h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.scs-request-modal__box input,
.scs-request-modal__box textarea {
  width: 100%;
  padding: 6px;
  margin-bottom: 8px;
  border: 1px solid var(--scs-border, #e5e7eb);
  background: var(--scs-bg, #ffffff);
  color: var(--scs-text, #111827);
  font-size: 13px;
}

.scs-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

#scs-modal-send {
  background: var(--scs-accent, #b9c9ea);
  color: var(--scs-text-alt, #ffffff);
  border: 1px solid var(--scs-accent, #b9c9ea);
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 6px;
}

#scs-modal-cancel {
  background: var(--scs-bg, #ffffff);
  color: var(--scs-text, #111827);
  border: 1px solid var(--scs-border, #e5e7eb);
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 6px;
}

.scs-modal-status {
  font-size: 12px;
}

/* ======================================================
   MODAL FEEDBACK
====================================================== */

.scs-request-feedback {
  margin-top: 8px;
  font-size: 13px;
}

.scs-request-feedback.info {
  color: #2563eb;
}

.scs-request-feedback.success {
  color: #16a34a;
}

.scs-request-feedback.error {
  color: #dc2626;
}

/* ======================================================
   MOBILE
====================================================== */

@media (max-width: 640px) {

  .scs-request-song {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .scs-request-btn {
    width: 100%;
    text-align: center;
  }
}

/* ================================
   Live Search Input
================================ */

.scs-search-wrap {
  margin-bottom: 18px;
}

#scsLiveSearch {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--scs-font, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif);

  color: var(--scs-text, #111827);
  background: var(--scs-bg, #ffffff);

  border: 1px solid var(--scs-border, #e5e7eb);
  border-radius: var(--scs-radius, 0);

  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

/* Focus state */
#scsLiveSearch:focus {
  border-color: var(--scs-accent, #00a8e8);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
  background: var(--scs-bg, #ffffff);
}

/* Placeholder styling */
#scsLiveSearch::placeholder {
  color: var(--scs-muted, #6b7280);
  opacity: 1;
}

/* Disabled (just in case) */
#scsLiveSearch:disabled {
  background: var(--scs-bg-alt, #f9fafb);
  color: #9ca3af;
  cursor: not-allowed;
}

/* =========================================
   SCS RadioDJ Live Search Results
========================================= */

.scs-live-search-results {
  margin-top: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--scs-border, #e5e7eb);
  background: var(--scs-bg, #ffffff);
}

/* Individual result row */
.scs-live-search-results .scs-song {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--scs-border, #e5e7eb);
  background: var(--scs-bg, #ffffff);
}

/* Remove last border */
.scs-live-search-results .scs-song:last-child {
  border-bottom: none;
}

/* Song text */
.scs-song-meta {
  font-size: 14px;
  line-height: 1.3;
  color: var(--scs-text, #111827);
}

.scs-song-meta strong {
  font-weight: 600;
}

.scs-live-search-results .scs-song:hover {
  background: var(--scs-bg-alt, #f9fafb);
}

.scs-live-search-results .scs-btn {
  white-space: nowrap;
  font-size: 13px;
  padding: 4px 10px;
  background: var(--scs-accent, #b9c9ea);
  color: var(--scs-text-alt, #ffffff);
  border: 1px solid var(--scs-accent, #b9c9ea);
}

.scs-live-search-results .scs-btn:hover {
  filter: brightness(0.9);
}

/* Empty / muted state */
.scs-live-search-results .scs-muted {
  padding: 10px;
  font-size: 14px;
  color: var(--scs-muted, #6b7280);
}
