/* stylelint-disable no-descending-specificity */

/* =========================================
   VARIABLES & FONTS
   ========================================= */
:root {
  --deep-midnight: #1b2032;
  --golden-hour: #e1a63c;
  --electric-grape: #6a1b82;
  --bright-sky: #fff;
  --error-red: #e74c3c;
  --success-green: #007000;
}

html,
body {
  height: auto;
  min-height: 100%;
  overflow: hidden auto;
  margin: 0;
  padding: 0;
}

body {
  background: var(--deep-midnight);
  font-family: Montserrat, sans-serif;
  color: var(--bright-sky);
  box-sizing: border-box;
  text-size-adjust: 100%;
}

/* =========================================
   HEADER & BRANDING
   ========================================= */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px !important;
  width: 100%;
}

.brand-container {
  width: 100%;
  text-align: center;
}

.header-branding-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.site-subtitle {
  color: var(--electric-grape);
  font-weight: 400;
  font-size: 1.2em;
  margin-top: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#theme-toggle,
.upgrade-theme-toggle {
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-size: 1.5em;
  color: var(--electric-grape);
  z-index: 10;
}

/* =========================================
   LAYOUT & FOOTER
   ========================================= */
.main-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  max-width: 1600px;
  margin: 20px auto 40px;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.main-content {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.countdown-wrapper {
  text-align: center;
  padding: 25px;
  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;
  margin: 0;
  color: var(--deep-midnight);
}

.widget-container-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget-container-wrap:empty {
  display: none !important;
}

.site-footer {
  text-align: center;
  padding: 20px;
  color: #666;
}

/* =========================================
   SHARED COMPONENTS (Hotel Prices, Price Trends & Map)
   ========================================= */
.wide-layout-container {
  width: 100%;
  max-width: 99%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.site-header.countdown-wrapper {
  padding: 25px !important;
  text-align: center;
  margin-bottom: 0;
  background: var(--bright-sky);
  border: 1px solid var(--golden-hour);
  border-radius: 12px;
  position: relative;
}

.wide-layout-container .header-branding-img {
  max-width: 700px !important;
  margin: 0 auto;
  width: 100%;
}

.controls-bar {
  background: var(--bright-sky);
  border: 1px solid var(--golden-hour);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 20%);
  padding: 25px;
  width: 100%;
  box-sizing: border-box;
  color: var(--deep-midnight);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}

.controls-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.nav-back-btn {
  width: 160px !important;
  height: 44px;
  margin: 0 !important;
  padding: 0 20px !important;
  font-size: 0.9rem !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--golden-hour) !important;
  color: var(--deep-midnight) !important;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%) !important;
  border-radius: 8px !important;
  border: none !important;
  font-weight: 700;
  text-transform: uppercase;
  box-sizing: border-box;
  text-decoration: none;
}

.nav-back-icon {
  width: 18px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 160px;
}

.control-group label,
.control-group .control-label {
  font-weight: 700;
  color: var(--deep-midnight);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-check-list {
  position: relative;
  width: 100%;
}

.dropdown-check-list .anchor {
  display: flex;
  align-items: center;
  padding: 0 35px 0 12px;
  height: 44px;
  border-radius: 8px;
  color: var(--deep-midnight);
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  background: var(--golden-hour);
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  line-height: normal;
  border: none;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.dropdown-check-list .items {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  background: white;
  z-index: 1000;
  min-width: 220px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--golden-hour);
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
}

.dropdown-check-list .items.visible {
  display: block;
}

.dropdown-check-list .items .item label {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
  color: var(--deep-midnight);
  font-size: 0.9rem;
  padding: 8px 4px;
  border-radius: 6px;
  transition: background 0.2s;
  font-weight: 600;
}

.dropdown-check-list .items .item label:hover {
  background: #fdf6d8;
}

.dropdown-check-list .items .item input[type="checkbox"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  accent-color: var(--electric-grape);
  cursor: pointer;
}

.dropdown-check-list .list-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.dropdown-check-list .list-controls button {
  flex: 1;
  padding: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 6px;
  border: none;
  text-transform: uppercase;
}

.radio-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  gap: 5px;
  height: 44px;
  white-space: nowrap;
  background-color: var(--golden-hour);
  font-weight: 700;
  width: 100%;
  padding: 0 12px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
  box-sizing: border-box;
  border: none;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.radio-group input[type="radio"] {
  appearance: none;
  width: 22px;
  height: 22px;
  cursor: pointer;
  background-image: url("https://hotel-data.highvibes.travel/images/purple_twinkle.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.35;
  transition: opacity 0.2s ease;
  border: none;
  outline: none;
  margin: 0;
  box-shadow: none;
}

.radio-group input[type="radio"]:checked {
  opacity: 1;
}

.radio-group label {
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0;
  color: var(--deep-midnight);
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

.radio-group input[type="radio"]:checked + label {
  opacity: 1;
  color: var(--deep-midnight);
}

input[type="date"] {
  appearance: none;
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--deep-midnight);
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  background: var(--golden-hour);
  font-weight: 700;
  width: 100%;
  box-sizing: border-box;
  border: none;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
  cursor: pointer;
}

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

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

#header-date-display {
  font-weight: 700;
  color: var(--electric-grape);
  font-size: 0.8rem;
}

/* =========================================
   LEGAL MODAL
   ========================================= */
body.modal-open {
  overflow: hidden;
}

.legal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 85%);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.legal-modal-content {
  background: var(--bright-sky);
  color: var(--deep-midnight);
  max-width: 500px;
  width: 100%;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 30%);
  text-align: center;
  font-family: Montserrat, sans-serif;
  max-height: 90vh;
  overflow-y: auto;
  outline: none;
}

.legal-modal-logo {
  width: 60px;
  margin-bottom: 15px;
}

.legal-modal-title-main {
  color: var(--electric-grape);
  margin-top: 0;
  font-weight: 700;
}

.legal-modal-subtitle {
  color: var(--electric-grape);
  margin-top: 0;
  font-weight: 700;
}

.legal-modal-desc {
  opacity: 0.9;
  line-height: 1.6;
  font-size: 0.95rem;
}

.legal-modal-link {
  color: var(--electric-grape);
  font-weight: 600;
}

.legal-modal-btn-group {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.legal-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.legal-modal-btn.decline {
  border: 1px solid currentcolor;
  background: transparent;
  color: inherit;
}

.legal-modal-btn.accept {
  border: none;
  background: var(--golden-hour);
  color: var(--deep-midnight);
}

.legal-modal-restricted-wrap {
  padding: 10px 0;
}

.legal-modal-lock-icon {
  font-size: 2.5rem;
  opacity: 0.5;
  margin-bottom: 15px;
}

.legal-modal-title-restricted {
  margin-top: 0;
  font-weight: 700;
}

.legal-modal-restricted-p1 {
  opacity: 0.9;
  line-height: 1.6;
  font-size: 0.9rem;
}

.legal-modal-restricted-p2 {
  opacity: 0.7;
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 15px;
}

.legal-modal-btn-retry {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: var(--golden-hour);
  color: var(--deep-midnight);
}

/* =========================================
   EXPANDABLE AUTH SECTION
   ========================================= */
.auth-section {
  transition: all 0.3s ease;
}

.auth-toggle-header {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 0 5px;
}

.auth-collapsible-content {
  overflow: hidden;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    margin-top 0.3s ease;
  max-height: 1000px;
  margin-top: 20px;
}

.auth-section.collapsed .auth-collapsible-content {
  max-height: 0;
  margin-top: 0;
}

#auth-expand-icon {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
  color: var(--deep-midnight);
  font-size: 1.2rem;
}

body.dark-mode #auth-expand-icon {
  color: var(--bright-sky);
}

.auth-section.collapsed #auth-expand-icon {
  transform: rotate(0deg);
}

/* =========================================
   TYPOGRAPHY & BUTTONS
   ========================================= */
.section-title {
  color: var(--deep-midnight);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5em;
  font-weight: 700;
}

.section-title-small {
  color: var(--deep-midnight);
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
}

a {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  padding: 12px 24px;
  background: var(--golden-hour);
  color: var(--deep-midnight);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  transition:
    background 0.2s,
    transform 0.2s;
  box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
  width: 80%;
  gap: 10px;
}

a:hover {
  background: #f1b74d;
  transform: translateY(-2px) scale(1.03);
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  width: auto;
  margin: 0;
  box-shadow: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  gap: 10px;
}

.modal-btn.accept {
  background: var(--golden-hour);
  color: var(--deep-midnight);
  border: 1px solid var(--golden-hour);
}

.modal-btn.decline {
  background: transparent;
  color: var(--electric-grape);
  border: 1px solid var(--electric-grape);
}

.plus-btn {
  background: var(--success-green) !important;
  color: white !important;
  width: auto;
  padding: 8px 20px;
  font-size: 0.9em;
}

.purple-btn {
  background: var(--electric-grape);
  color: white !important;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
}

.icon-btn.gray {
  color: #999;
}

.icon-btn.red {
  color: var(--error-red);
}

/* Style for the twinkle icon and text centering */
.btn-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  pointer-events: none;
  flex-shrink: 0;
}

.btn-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center horizontally relative to button */
  text-align: center;
}

.btn-desc {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
  line-height: 1.1;
}

/* =========================================
   AUTH STYLING
   ========================================= */
.auth-input {
  width: 80%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.auth-btn-group {
  display: flex;
  gap: 10px;
  width: 80%;
  margin: 0 auto;
  justify-content: center;
}

.auth-btn-group.wrap {
  flex-wrap: wrap;
}

.google-btn {
  background-color: #fff;
  color: #757575;
  border: 1px solid #ddd;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 15px auto;
  width: auto;
}

.forgot-link {
  display: block;
  margin-top: 10px;
  font-size: 0.8em;
  color: var(--electric-grape);
  text-decoration: underline;
  cursor: pointer;
}

.auth-divider {
  margin: 15px 0;
  color: #999;
  font-size: 0.8em;
}

.user-email-text {
  font-weight: bold;
  color: var(--electric-grape);
  margin-bottom: 10px;
}

/* =========================================
   PLUS FEATURES
   ========================================= */
.plus-feature-wrap {
  position: relative;
  display: block;
  margin-bottom: 10px;
}

.plus-overlay {
  position: absolute;
  inset: 0;
  background: rgb(255 255 255 / 40%);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  z-index: 10;
  border: 1px dashed var(--electric-grape);
}

.plus-badge {
  background: var(--electric-grape);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 20%);
}

/* =========================================
   TOAST NOTIFICATIONS (CENTERED)
   ========================================= */
#toast-container {
  position: fixed;
  z-index: 3000;
  left: 50%;
  transform: translateX(-50%);
  bottom: 30px;
  pointer-events: none;
  width: auto;
  max-width: 90%;
}

.toast {
  background: #6a1b82 !important; /* Purple (Electric Grape) */
  color: #e1a63c !important; /* Yellow (Golden Hour) */
  font-weight: bold;
  border: 2px solid #e1a63c;
  padding: 12px 16px !important;
  border-radius: 50px;
  font-size: 0.9em;
  box-shadow: 0 4px 12px rgb(0 0 0 / 25%);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateY(10px);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* =========================================
   UTILITIES & OVERRIDES
   ========================================= */
.flatpickr-confirm {
  background: var(--golden-hour) !important;
  color: var(--deep-midnight) !important;
  padding: 5px 10px !important;
  font-weight: bold;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.flex-1 {
  flex: 1 !important;
}

.w-80 {
  width: 80% !important;
}

.w-90 {
  width: 90% !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-15 {
  margin-bottom: 15px;
}

.mt-20 {
  margin-top: 20px;
}

.btn-small {
  padding: 5px 15px !important;
  font-size: 0.8em !important;
}

.btn-large {
  padding: 12px !important;
  font-size: 1rem !important;
}

@media (width <= 600px) {
  .config-form-grid {
    grid-template-columns: 1fr;
  }

  .main-layout {
    padding: 0 10px;
  }
}

/* =========================================
   DARK MODE STYLES
   ========================================= */
body.dark-mode .countdown-wrapper,
body.dark-mode .legal-modal-content,
body.dark-mode .auth-input {
  background-color: var(--deep-midnight);
  color: var(--bright-sky);
  border: 1px solid var(--golden-hour);
}

body.dark-mode .section-title,
body.dark-mode .section-title-small {
  color: var(--bright-sky);
}

/* Shared Components Dark Mode */
body.dark-mode .site-header.countdown-wrapper,
body.dark-mode .controls-bar {
  background-color: var(--deep-midnight);
  border: 1px solid var(--golden-hour);
}

body.dark-mode .controls-header {
  border-bottom: 1px solid #444;
}

body.dark-mode .control-group label,
body.dark-mode .control-group .control-label,
body.dark-mode #header-date-display {
  color: var(--bright-sky);
}

body.dark-mode .dropdown-check-list .items {
  background: var(--deep-midnight);
  border: 1px solid var(--golden-hour);
}

body.dark-mode .dropdown-check-list .items .item label {
  color: var(--bright-sky);
}

body.dark-mode .dropdown-check-list .items .item label:hover {
  background: #2a314d;
}

body.dark-mode .dropdown-check-list .list-controls {
  border-bottom: 1px solid #444;
}
