/* /home/hkiugcom/website.airplay/assets/audit/audit_layout.css */

/* utility: used for JS toggle of elements (was Tailwind .hidden) */
.hidden { display: none !important; }

/* ── Page layout ── */

.au-topbar {
  display: block;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0.75rem 1rem;
  background: #111827;
  border-radius: 1rem;
  border: 1px solid #1f2937;
  margin-bottom: 1.5rem;
}

.au-content {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* table loading / infinite scroll status */
#auditTableLoading {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#auditTableLoading span {
  font-size: 12px;
  color: #6b7280;
  user-select: none;
}

.au-infinite-wrap {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#auditInfiniteStatus {
  font-size: 11px;
  color: #6b7280;
  user-select: none;
}

/* ── Select / input form controls ── */

.audit-compact-select {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #f3f4f6;
}

/* search input overrides (no dropdown arrow, normal padding) */
#auditSearch {
  width: 7rem;
  padding: 4px 12px;
}

/* ── View menu ── */

.au-view-menu-head {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.au-view-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: rgba(209, 213, 219, 0.8);
  font-weight: 600;
}

.au-view-panel {
  padding: 0.5rem 0.75rem;
}

/* ── Modal shared utilities ── */


.au-load-pill {
  position: relative;
  overflow: hidden;
  height: 8px;
  width: 74px;
  border-radius: 9999px;
  border: 1px solid #1f2937;
  background: #111827;
}

.au-load-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 38%;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.9);
}

/* impact modal chart */
.au-impact-chart-wrap {
  height: 175px;
  position: relative;
}

@media (min-width: 640px) {
  .au-impact-chart-wrap { height: 320px; }
}

.au-chart-hint {
  margin-top: 0.75rem;
  font-size: 10px;
  color: rgba(100, 116, 139, 0.45);
  letter-spacing: 0.04em;
  text-align: center;
}

/* station profile modal */
.au-modal-inner {
  padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
  .au-modal-inner { padding: 0.75rem 1.25rem; }
}

.au-curve-controls {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.au-curve-btn-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.au-date-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.au-wday-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #6b7280;
  flex-shrink: 0;
  text-transform: uppercase;
}

.au-date-input {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  color: #f3f4f6;
  padding: 6px 10px;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  cursor: pointer;
}
.au-date-input:focus {
  outline: none;
  border-color: rgba(255,255,255,.25);
}

.au-ref-subtitle {
  font-size: 11px;
  color: #6b7280;
  line-height: 1;
}

.au-chart-wrap {
  height: 160px;
  position: relative;
}

@media (min-width: 640px) {
  .au-chart-wrap { height: 210px; }
}

.au-legend-row {
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 11px;
  color: #9ca3af;
  min-height: 18px;
}

.au-legend-items {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.au-legend-mode {
  font-size: 10px;
  color: #fff;
  font-weight: 500;
  line-height: 1.35;
  text-align: right;
  flex-shrink: 0;
}

/* ── Options modal ── */

/* spacing override: opts boxes stack with gap */
.ap-audit-opts-box {
  margin-bottom: 1rem;
}
.ap-audit-opts-box:last-child {
  margin-bottom: 0;
}

/* section heading: always gets a small bottom margin */
.ap-audit-section-hd {
  margin-bottom: 4px;
}

/* opts description paragraph */
.au-opts-para {
  font-size: 11px;
  color: rgba(100, 116, 139, 0.75);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* threshold section (POP colour) */
.au-opts-threshold-label {
  font-size: 10px;
  color: #6b7280;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.au-opts-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.au-opts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.au-opts-col-center {
  text-align: center;
}

.au-opts-val {
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.au-opts-val--green  { color: rgba(52, 211, 153, 0.9); }
.au-opts-val--yellow { color: rgba(250, 204, 21, 0.9); }
.au-opts-val--red    { color: rgba(248, 113, 113, 0.9); }

.au-opts-desc {
  font-size: 10px;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.au-opts-desc--green  { color: rgba(74, 222, 128, 0.5); }
.au-opts-desc--yellow { color: rgba(250, 204, 21, 0.5); }
.au-opts-desc--red    { color: rgba(248, 113, 113, 0.5); }

.au-opts-threshold-input {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: rgba(21, 25, 38, 0.6);
  border: 1px solid rgba(43, 50, 71, 0.7);
  border-radius: 6px;
  text-align: center;
  color: rgba(250, 204, 21, 0.9);
  font-size: 12px;
}

.au-range-input {
  width: 100%;
  margin-top: 0.5rem;
}

/* bottom section: track curves + POP estimates */
.au-opts-bottom-row {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(43, 50, 71, 0.5);
  padding-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.au-opts-col {
  display: flex;
  flex-direction: column;
}

.au-opts-col-desc {
  font-size: 11px;
  color: rgba(100, 116, 139, 0.75);
  margin-top: 0.375rem;
  line-height: 1.5;
}

.au-opts-row-bottom {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.au-opts-row-bottom--between {
  justify-content: space-between;
}

.au-opts-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.au-opts-toggle-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 700;
  width: 28px;
}

.au-opts-adv-row {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(43, 50, 71, 0.5);
}

/* advanced modal content */
.au-opts-libscan-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.au-opts-label-text {
  font-size: 11px;
  color: #9ca3af;
}

.au-opts-select {
  font-size: 11px;
  background: rgba(21, 25, 38, 0.7);
  border: 1px solid rgba(43, 50, 71, 0.7);
  border-radius: 6px;
  padding: 0.125rem 0.375rem;
  color: rgba(209, 213, 219, 0.9);
}

.au-opts-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.au-opts-text-input {
  padding: 0.375rem 0.75rem;
  background: rgba(21, 25, 38, 0.7);
  border: 1px solid rgba(43, 50, 71, 0.7);
  border-radius: 6px;
  font-size: 12px;
  width: 130px;
  color: rgba(243, 244, 246, 0.9);
  transition: border-color 0.12s;
}
.au-opts-text-input:focus {
  outline: none;
  border-color: rgba(43, 50, 71, 1);
}

.au-track-preview {
  margin-top: 0.375rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(43, 50, 71, 0.6);
  background: rgba(10, 12, 20, 0.5);
  font-size: 11px;
}

.au-track-preview-name {
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.au-track-preview-meta {
  color: #6b7280;
}

.au-track-preview-meta span {
  color: #9ca3af;
}

.au-track-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.au-opts-msg {
  font-size: 11px;
  margin-top: 0.25rem;
}

.au-opts-full-select {
  width: 100%;
  padding: 0.375rem 0.5rem;
  background: rgba(21, 25, 38, 0.7);
  border: 1px solid rgba(43, 50, 71, 0.7);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(209, 213, 219, 0.9);
  margin-bottom: 0.5rem;
}

.au-opts-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(21, 25, 38, 0.7);
  border: 1px solid rgba(43, 50, 71, 0.7);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(229, 231, 235, 0.9);
  resize: none;
  line-height: 1.5;
  transition: border-color 0.12s;
}
.au-opts-textarea:focus {
  outline: none;
  border-color: rgba(43, 50, 71, 1);
}

.au-opts-char-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.375rem;
}

.au-opts-char-count {
  font-size: 11px;
  color: #4b5563;
}

.au-opts-status {
  font-size: 11px;
  margin-top: 0.375rem;
  min-height: 16px;
}

/* ── Trash list (audit_trash_list.js) ── */

.au-trash-section {
  margin-bottom: 1rem;
}

.au-trash-hdr {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.au-trash-empty {
  font-size: 12px;
  color: #4b5563;
  padding: 0.25rem 0;
}

.au-trash-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(43, 50, 71, 0.4);
}

.au-trash-row:last-child {
  border-bottom: none;
}

.au-trash-info {
  min-width: 0;
  flex: 1;
}

.au-trash-title {
  color: #e5e7eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  line-height: 1.25;
}

.au-trash-meta {
  font-size: 11px;
  color: #6b7280;
  margin-top: 0.125rem;
}

.au-msg-loading  { color: #4b5563; }
.au-msg-error    { color: rgba(248, 113, 113, 0.9); font-weight: 600; }
.au-msg-ok       { color: rgba(52, 211, 153, 0.9); font-weight: 600; }

/* ── Support modal status message (audit_support_modal.js) ── */

.au-status--neutral { color: #9ca3af; }
.au-status--error   { color: rgba(248, 113, 113, 0.9); }
.au-status--ok      { color: rgba(52, 211, 153, 0.9); }
.au-status--warn    { color: rgba(250, 204, 21, 0.9); }

/* modal body loading state */
.au-modal-loading {
  color: #6b7280;
  font-size: 12px;
  padding: 0.5rem 0;
}

/* ═══════════════════════════════════════════════════════════
   BROADCAST IDENTITY BAR (shared pattern with track.php)
═══════════════════════════════════════════════════════════ */

.au-topbar {
  background: #0d1117;
  border-color: rgba(255,255,255,0.07);
}

.au-broadcast-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tp-broadcast-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e63535;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(230,53,53,0.4);
  animation: tp-broadcast-pulse 2.4s ease-in-out infinite;
}
@keyframes tp-broadcast-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(230,53,53,0.55); }
  65%  { box-shadow: 0 0 0 6px rgba(230,53,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(230,53,53,0); }
}
@media (prefers-reduced-motion: reduce) {
  .tp-broadcast-dot { animation: none; }
}
.tp-broadcast-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230,53,53,0.82);
}
.tp-broadcast-sep {
  font-size: 11px;
  color: rgba(255,255,255,0.14);
}
.tp-broadcast-station {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(148,163,184,0.50);
}
