/* --- PAGE SPECIFIC OVERRIDES --- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--deep-midnight);
}

/* Confine table container height to enable internal vertical scrolling */
.table-container {
  background: var(--bright-sky);
  border: 1px solid var(--golden-hour);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 20%);
  width: 100%;
  box-sizing: border-box;
  color: var(--deep-midnight);
  padding: 0 0 15px;
  overflow: auto;
  max-height: 70vh;
  -webkit-overflow-scrolling: touch;
}

#record-count {
  margin-left: auto;
  font-style: italic;
  color: #888;
  font-size: 0.85rem;
  padding-bottom: 10px;
  white-space: nowrap;
}

.control-group input {
  padding: 0 12px;
  border-radius: 8px;
  color: var(--deep-midnight);
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  line-height: normal;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
  height: 44px;
}

.control-group input[type="date"] {
  appearance: none;
  display: block;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: var(--golden-hour);
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.crowd-bar-input-wrapper {
  position: relative;
  height: 44px;
  width: 100%;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

#max-crowd {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 10;
  cursor: pointer;
  margin: 0;
}

#crowd-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--golden-hour);
  transition: width 0.1s ease;
}

#crowd-bar-label {
  position: absolute;
  width: 100%;
  text-align: center;
  font-weight: 700;
  color: var(--deep-midnight);
  z-index: 5;
  font-size: 0.9rem;
  pointer-events: none;
}

.dropdown-check-list .anchor::after {
  content: "\f0d7";
  font-family: "Font Awesome 5 Free", sans-serif;
  font-weight: 900;
  position: absolute;
  right: 12px;
  font-size: 1rem;
  color: var(--deep-midnight);
}

.dropdown-check-list .items {
  right: 0;
}

.btn-all {
  background: var(--golden-hour);
  color: var(--deep-midnight);
}

.btn-none {
  background: #eee;
  color: #777;
}

/* --- STICKY TABLE STYLING --- */
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
  text-align: center;
}

.price-table thead th {
  background-color: var(--deep-midnight);
  color: var(--bright-sky);
  padding: 12px 4px;
  border-bottom: 2px solid var(--golden-hour);
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.price-table tbody td {
  padding: 10px 4px;
  border-bottom: 1px solid #eee;
  color: var(--deep-midnight);
}

.price-table th:first-child,
.price-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 25;
  background-color: white !important;
  border-right: 2px solid #eee;
  padding-left: 15px !important;
  text-align: left;
  white-space: nowrap !important;
  cursor: pointer;
}

.price-table thead th:first-child {
  z-index: 30;
  background-color: var(--deep-midnight) !important;
  color: var(--bright-sky) !important;
  top: 0;
  left: 0;
}

.bg-low {
  background-color: #d4edda;
  color: #155724;
}

.bg-med {
  background-color: #fff3cd;
  color: #856404;
}

.bg-high {
  background-color: #ffe5d0;
  color: #855d04;
}

.bg-peak {
  background-color: #f8d7da;
  color: #721c24;
}

.bg-unavailable {
  background-color: #f8f9fa;
  color: #adb5bd !important;
  font-style: italic;
}

.upgrade-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: var(--golden-hour);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgb(0 0 0 / 15%);
  margin: 10px auto;
  width: 100%;
  box-sizing: border-box;
}

.upgrade-link {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--deep-midnight) !important;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: underline;
  width: auto !important;
}

/* Toast Notification Styling Overrides */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  border-radius: 8px;
  z-index: 10000;
  box-shadow: 0 8px 20px rgb(0 0 0 / 30%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (width <= 600px) {
  .controls-bar {
    grid-template-columns: 1fr 1fr;
    display: grid;
    padding: 15px !important;
  }

  .controls-header,
  #record-count {
    grid-column: 1 / -1;
  }

  .control-group {
    min-width: 0;
  }

  .nav-back-btn {
    width: calc(50% - 10px) !important;
  }

  .radio-group {
    padding: 10px 6px;
    font-size: 0.75rem;
    flex-direction: column;
    height: auto;
    align-items: flex-start;
    gap: 8px;
  }

  #days-dropdown .items {
    right: auto;
    left: 0;
  }
}

/* =========================================
   DARK MODE OVERRIDES
   ========================================= */
body.dark-mode .table-container {
  background-color: var(--deep-midnight);
  border: 1px solid var(--golden-hour);
}

body.dark-mode .price-table tbody td {
  border-bottom: 1px solid #444;
}

body.dark-mode .price-table th:first-child,
body.dark-mode .price-table td:first-child {
  background-color: var(--deep-midnight) !important;
  border-right: 2px solid #444;
  color: var(--bright-sky);
}

body.dark-mode .price-table td:nth-child(2) {
  color: var(--bright-sky);
}

body.dark-mode .btn-none {
  background: #444;
  color: #ccc;
}

body.dark-mode .crowd-bar-input-wrapper {
  background: #444;
}

/* DataTables specifically injects some white backgrounds we need to clear in dark mode */
/* stylelint-disable selector-class-pattern, no-descending-specificity */
body.dark-mode .dataTables_wrapper .dataTables_info,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--bright-sky) !important;
}

body.dark-mode table.dataTable.display > tbody > tr.odd > .sorting_1,
body.dark-mode
  table.dataTable.order-column.stripe
  > tbody
  > tr.odd
  > .sorting_1 {
  box-shadow: none !important;
}

body.dark-mode table.dataTable.display > tbody > tr.even > .sorting_1,
body.dark-mode
  table.dataTable.order-column.stripe
  > tbody
  > tr.even
  > .sorting_1 {
  box-shadow: none !important;
}
/* stylelint-enable selector-class-pattern, no-descending-specificity */

/* =========================================
   EXTRACTED INLINE STYLES
   ========================================= */

.date-display-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.date-display-icon {
  width: 16px;
  height: 16px;
}

#empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 40px;
}

.empty-state-icon {
  font-size: 2.5rem;
  color: #ccc;
  margin-bottom: 10px;
}

#empty-title {
  margin: 0;
  color: inherit;
}

#empty-text {
  color: #666;
  max-width: 300px;
  text-align: center;
}

#main-table {
  display: none;
  width: 100%;
}

.express-pass-icon {
  width: 12px;
}

#plus-upgrade-note {
  display: none;
}

.upgrade-card-icon {
  width: 30px;
}

/* =========================================
   PLUS PITCH CARD STYLING
   ========================================= */

.plus-pitch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  text-align: center;
  background: var(--bright-sky);
  border-radius: 16px;
  max-width: 420px;
  margin: 20px auto;
  border: 1px solid var(--golden-hour);
}

.plus-pitch-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.plus-pitch-lock {
  font-size: 1.8rem;
  color: var(--electric-grape);
}

.plus-pitch-title {
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--deep-midnight);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.plus-pitch-text {
  font-family: Montserrat, sans-serif;
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 30px;
}

.plus-pitch-btn {
  background-color: var(--golden-hour) !important;
  color: var(--deep-midnight) !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  padding: 15px 35px !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 15px rgb(225 166 60 / 40%) !important;
  transition:
    transform 0.2s,
    box-shadow 0.2s !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
}

.plus-pitch-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 20px rgb(225 166 60 / 60%) !important;
}

body.dark-mode .plus-pitch-card {
  background-color: #242a42;
}

body.dark-mode .plus-pitch-title {
  color: var(--bright-sky);
}

body.dark-mode .plus-pitch-text {
  color: #bbb;
}
