/* ============================================================
   COMPONENTS — MEMBURU PEMANGSA
   Modal, fiktif bar, badges, shared UI components
   ============================================================ */

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  /* backdrop-filter: blur(2px); */
}

.modal-overlay.open {
  display: flex;
  animation: modal-in var(--t-normal) ease-out;
}

@keyframes modal-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  max-width: 800px;
  width: 100%;
  animation: modal-box-in var(--t-normal) ease-out;
}

@keyframes modal-box-in {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--sp-2);
}

.modal-close-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  padding: 8px 14px;
  min-height: var(--touch-min);
  cursor: pointer;
  transition:
    background var(--t-fast),
    color var(--t-fast),
    border-color var(--t-fast);
}

.modal-close-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.modal-body {
  /* player is rendered inside */
}

/* ============================================
   FIKTIF BAR — Disclaimer (PERSISTENT, FIXED)
   ALWAYS visible — non-negotiable per PRD §9
   ============================================ */
.fiktif-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fiktif-bar);
  background: #05100a; /* intentionally dark, independent of theme */
  border-top: 1px solid #123;
  font-size: var(--fs-xs);
  padding: 8px var(--sp-4);
  display: flex;
  gap: 10px 18px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  letter-spacing: var(--ls-tight);
}

.fiktif-badge {
  border: 1px solid #1c8a41;
  padding: 2px var(--sp-2);
  letter-spacing: var(--ls-xwide);
  color: #33ff77;
  font-size: 10px;
  flex-shrink: 0;
}

.fiktif-label {
  color: #1c8a41;
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}

.fiktif-sep {
  color: #0f3d1f;
}

.fiktif-help {
  color: #dfeee6;
  opacity: 0.9;
  line-height: 1.5;
}

.fiktif-help b {
  color: #fff;
  font-weight: normal;
  border-bottom: 1px solid rgba(223, 238, 230, 0.4);
}

.fiktif-help a {
  color: #c7ffd8;
  border-bottom-color: rgba(199, 255, 216, 0.4);
}

/* ============================================
   BADGE COMPONENTS
   ============================================ */
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: var(--ls-xwide);
  padding: 2px var(--sp-2);
  border: 1px solid var(--ink-dim);
  color: var(--ink);
  text-transform: uppercase;
}

.badge-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.badge-locked {
  border-color: var(--locked);
  color: var(--locked);
}

/* ============================================
   STATUS INDICATOR
   ============================================ */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-dim);
  margin-right: var(--sp-1);
}

.status-dot.live {
  background: var(--danger);
  animation: blink 1.4s steps(1) infinite;
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--sp-6) 0;
}

/* ============================================
   GENERAL BUTTON VARIANTS
   ============================================ */
.btn-outline {
  background: transparent;
  border: 1px solid var(--ink-dim);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  padding: 10px var(--sp-4);
  min-height: var(--touch-min);
  cursor: pointer;
  transition:
    background var(--t-fast),
    color var(--t-fast),
    border-color var(--t-fast);
  text-transform: uppercase;
}

.btn-outline:hover {
  background: var(--ink-dim);
  color: var(--bg);
}

/* ============================================
   LOADING / SKELETON
   ============================================ */
.skeleton-line {
  background: var(--line);
  height: var(--fs-sm);
  margin-bottom: var(--sp-2);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay.open {
    animation: none !important;
  }
  .modal-box {
    animation: none !important;
  }
  .status-dot.live {
    animation: none !important;
  }
  .skeleton-line {
    animation: none !important;
  }
}
