/* ===================================================================
   admin-bundle-tiers.css  (v1 — Phase 3.7-G)

   Styles for the Bundle Discount Tiers section on /admin/courses/index.html.
   Uses existing brand variables (--cp-*) from admin-courses.css. Loaded AFTER
   admin-courses.css so it can override where needed.
   =================================================================== */

/* ============= CARD SECTION ============= */

.bundle-tiers-card {
  margin-top: 24px;
}

.bundle-tiers-card .bt-explainer {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 16px 0;
  padding: 10px 14px;
  background: rgba(255, 140, 0, 0.04);
  border-left: 3px solid rgba(255, 140, 0, 0.4);
  border-radius: 0 6px 6px 0;
}

.bundle-tiers-card .bt-explainer strong {
  color: var(--cp-gold, #ffa733);
}

/* ============= TABLE ============= */

.bt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 4px;
  font-size: 13px;
}

.bt-table thead th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cp-text-muted, rgba(240,240,245,0.55));
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bt-table tbody tr {
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.bt-table tbody tr:hover {
  background: rgba(255, 140, 0, 0.04);
}

.bt-table tbody tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.bt-table td {
  padding: 12px;
  vertical-align: middle;
}

.bt-table td:first-child { padding-left: 14px; }
.bt-table td:last-child  { padding-right: 14px; }

/* ============= PILLS ============= */

.bt-min-pill,
.bt-discount-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.bt-min-pill {
  background: rgba(64, 156, 255, 0.12);
  color: #58a6ff;
  border: 1px solid rgba(64, 156, 255, 0.3);
}

.bt-discount-pill {
  background: linear-gradient(180deg, rgba(255, 140, 0, 0.18), rgba(255, 140, 0, 0.06));
  color: #ffa733;
  border: 1px solid rgba(255, 140, 0, 0.4);
}

/* ============= EMPTY / LOADING ============= */

.bt-empty,
.bt-loading {
  text-align: center;
  padding: 36px 18px;
  color: var(--cp-text-muted, rgba(240,240,245,0.55));
  font-size: 13px;
}

.bt-loading {
  font-size: 12px;
  padding: 24px;
}

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

.bt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: bt-fadein 0.15s ease;
}

.bt-modal-overlay[hidden] {
  display: none;
}

@keyframes bt-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bt-modal {
  background: linear-gradient(180deg, #14141c, #0e0e16);
  border: 1px solid rgba(255, 140, 0, 0.3);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 140, 0, 0.1);
  animation: bt-slidein 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bt-slidein {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

.bt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bt-modal-header h3 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffd07a;
}

.bt-modal-body {
  padding: 18px;
}

.bt-modal-body .cp-form-row {
  margin-bottom: 14px;
}

.bt-modal-body .cp-form-row:last-child {
  margin-bottom: 0;
}

.bt-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 14px 14px;
}

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

@media (max-width: 600px) {
  .bt-table thead th,
  .bt-table td {
    padding: 8px;
    font-size: 12px;
  }
  .bt-table td .cp-btn-sm {
    padding: 4px 8px;
    font-size: 11px;
  }
  .bt-modal {
    max-width: 100%;
  }
}

/* End of admin-bundle-tiers.css v1 */
