/* ========================================================
   COCA-COLA SSD INTELLIGENCE PLATFORM — MEDIA BOOST PAGE
   ======================================================== */

.content-area {
  padding: 24px 28px;
  min-width: 0;
}

.main-wrap {
  min-width: 0;
}

/* Page Header */
.mb-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.mb-page-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.mb-page-desc {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}

/* KPI Group */
.mb-kpi-group {
  display: flex;
  gap: 12px;
}

.mb-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 18px;
  text-align: center;
  min-width: 130px;
  box-shadow: var(--shadow);
}

.mb-kpi-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--red);
}

.mb-kpi-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Layout Grid */
.mb-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 992px) {
  .mb-grid {
    grid-template-columns: 1fr;
  }
}

/* Base Cards */
.mb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.mb-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 18px;
}

/* Form Styling */
.mb-form-group {
  margin-bottom: 18px;
}

.mb-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Custom Slider */
.mb-slider {
  width: 100%;
  appearance: none;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  outline: none;
  margin: 10px 0;
}

.mb-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  transition: transform 0.1s var(--ease);
  box-shadow: 0 2px 6px rgba(230, 27, 35, 0.4);
}

.mb-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  margin-top: 4px;
}

.slider-current {
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
}

/* Select Dropdown */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.mb-select {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.mb-select:focus {
  border-color: var(--red);
}

/* Launch Button */
.mb-btn-launch {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(230, 27, 35, 0.2);
  transition: background 0.2s, transform 0.1s;
  margin-top: 24px;
}

.mb-btn-launch:hover {
  background: var(--red-dark);
}

.mb-btn-launch:active {
  transform: scale(0.98);
}

/* Right Table Card Header */
.table-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.mb-search {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  outline: none;
  background: var(--surface-2);
  width: 180px;
}

.mb-search:focus {
  background: var(--surface);
  border-color: var(--red);
}

.select-table {
  width: 120px;
}

.mb-table-select {
  width: 100%;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  appearance: none;
  outline: none;
  cursor: pointer;
  padding-right: 24px;
}

/* Table Design */
.mb-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 520px; /* Constrains height to approximately 12 rows */
  overflow-y: auto;
}

.mb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.mb-table th {
  position: sticky; /* Keeps table header visible during scroll */
  top: 0;
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.mb-table td {
  padding: 12px;
  font-size: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  vertical-align: middle;
  color: var(--text-1);
}

.mb-table tbody tr:last-child td {
  border-bottom: none;
}

.store-name-cell {
  font-weight: 700;
  color: var(--text-1);
}

.store-region-cell {
  color: var(--text-2);
  font-weight: 500;
}

.decline-cell {
  color: var(--red);
  font-weight: 700;
}

/* Checkbox */
.mb-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}

/* Priority badge (Bordered red pill) */
.priority-badge-critical {
  font-size: 9px;
  font-weight: 800;
  color: var(--red);
  border: 1px solid rgba(230, 27, 35, 0.3);
  background: rgba(230, 27, 35, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.priority-badge-high {
  font-size: 9px;
  font-weight: 800;
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.priority-badge-medium {
  font-size: 9px;
  font-weight: 800;
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Status badge (Muted gray) */
.status-badge-draft, .status-badge-pending_creative {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
}

.status-badge-ready {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
}

.status-badge-launched {
  font-size: 10px;
  font-weight: 600;
  color: var(--red);
  background: rgba(230, 27, 35, 0.1);
  border: 1px solid rgba(230, 27, 35, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
}

.status-badge-paused {
  font-size: 10px;
  font-weight: 600;
  color: #e2e8f0;
  background: #475569;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
}

.status-badge-completed {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #10b981;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
}

/* Toast Notification styling */
.toast-notif {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2000;
  animation: slideIn 0.3s var(--ease) forwards;
}

/* Success Modal Overlay */
.mb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}

.mb-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mb-modal-icon-container {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.mb-modal-icon {
  width: 32px;
  height: 32px;
}

.mb-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.mb-modal-subtitle {
  font-size: 13.5px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.4;
}

.mb-modal-details-box {
  background: #f9fafb;
  border-radius: 10px;
  width: 100%;
  padding: 18px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.mb-details-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.mb-details-label {
  font-weight: 700;
  color: #374151;
}

.mb-details-val {
  font-weight: 500;
  color: #1f2937;
}

.mb-modal-btn-close {
  width: 110px;
  height: 38px;
  background: #E61B23;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.mb-modal-btn-close:hover {
  background: #b8161c;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  .mb-kpi-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 8px;
  }
  .mb-kpi-card {
    min-width: 0;
    padding: 8px 4px;
  }
  .mb-kpi-val {
    font-size: 14px;
  }
  .mb-kpi-label {
    font-size: 8px;
  }
  
  /* Force layout columns to stack cleanly */
  .mb-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important; /* Overrides desktop align-items: start to force full width */
    width: 100% !important;
    max-width: 100% !important;
  }

  .mb-col-left,
  .mb-col-right {
    width: 100% !important;
    max-width: 100% !important;
  }

  .mb-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Stack search input and filter dropdown vertically */
  .table-header-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .table-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .mb-search,
  .select-wrapper.select-table {
    width: 100% !important;
  }

  /* Allow table to scroll horizontally inside the card instead of breaking the card boundary */
  .mb-table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mb-table {
    min-width: 800px !important; /* Increased width to display all 9 columns neatly */
  }

  /* Sticky first column (checkbox) and second column (Store Name) on mobile */
  .mb-table th:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 20 !important;
    background: var(--surface-2) !important;
  }
  .mb-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
    background: var(--surface) !important;
  }

  .mb-table th:nth-child(2) {
    position: sticky !important;
    left: 40px !important;
    z-index: 20 !important;
    background: var(--surface-2) !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04) !important; /* Visual boundary line */
  }
  .mb-table td:nth-child(2) {
    position: sticky !important;
    left: 40px !important;
    z-index: 10 !important;
    background: var(--surface) !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04) !important; /* Visual boundary line */
  }
  /* Reduce table header font size on mobile */
  .mb-table th {
    font-size: 8px !important;
    padding: 8px 10px !important; /* Slightly tighter padding */
  }

  /* Reduce table cell body text size on mobile */
  .mb-table td {
    font-size: 10.5px !important;
    padding: 10px 10px !important; /* Slightly tighter padding */
  }

  /* Reduce priority badge sizes on mobile */
  .priority-badge-critical,
  .priority-badge-high,
  .priority-badge-medium {
    font-size: 8px !important;
    padding: 1px 6px !important;
  }

  /* Reduce status badge sizes on mobile */
  .status-badge-draft,
  .status-badge-pending_creative,
  .status-badge-ready,
  .status-badge-launched,
  .status-badge-paused,
  .status-badge-completed {
    font-size: 8.5px !important;
    padding: 1px 6px !important;
  }

}

@media (max-width: 480px) {
  .mb-kpi-group {
    grid-template-columns: 1fr;
  }
  .mb-header-row {
    flex-direction: column;
    align-items: stretch;
  }
}
