/**
 * High Mountains - Premium Winter & Christmas Experience Stylesheet
 * Independent visual layer with realistic snow, subtle festive touches & music controls.
 * Zero layout shifts or modifications to underlying website structure.
 */

/* ==========================================================================
   1. FULLSCREEN SNOWFALL CANVAS OVERLAY
   ========================================================================== */
#hm-winter-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none !important;
  z-index: 99998;
  display: block;
}

/* ==========================================================================
   2. SUBTLE FESTIVE & WINTER VISUAL DETAILS (PRESERVES EXISTING DESIGN)
   ========================================================================== */

/* Subtle winter frost glow on NYE / Live trips badge */
.hm-header-action-badge {
  position: relative;
  box-shadow: 0 0 14px rgba(186, 230, 253, 0.35);
}

.hm-header-action-badge::before {
  content: '❄';
  display: inline-block;
  margin-right: 5px;
  font-size: 11px;
  color: #38bdf8;
  animation: hmSnowSparkle 3s ease-in-out infinite alternate;
}

@keyframes hmSnowSparkle {
  0% { transform: scale(0.9) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.15) rotate(15deg); opacity: 1; filter: drop-shadow(0 0 4px #bae6fd); }
  100% { transform: scale(0.9) rotate(-10deg); opacity: 0.7; }
}

/* Subtle frosted snow cap accent on cards with winter tags */
[data-category="treks"] .hm-jw-card-badge,
.hm-pic3-badge-new {
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   3. FLOATING WINTER & MUSIC CONTROL WIDGET
   ========================================================================== */
.hm-winter-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99990;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
}

/* Main Floating Trigger Button */
.hm-winter-trigger-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(56, 189, 248, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: none;
}

.hm-winter-trigger-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(15, 23, 42, 0.95);
  border-color: #38bdf8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 189, 248, 0.4);
}

.hm-winter-trigger-icon {
  font-size: 19px;
  color: #38bdf8;
  transition: transform 0.4s ease;
}

.hm-winter-trigger-btn:hover .hm-winter-trigger-icon {
  transform: rotate(45deg);
}

/* Sound Equalizer Wave Bars (Animates when music is playing) */
.hm-winter-sound-waves {
  display: none;
  align-items: center;
  gap: 2.5px;
  height: 16px;
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.9);
  padding: 2px 4px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.hm-winter-widget.music-playing .hm-winter-sound-waves {
  display: flex;
}

.hm-wave-bar {
  width: 2.5px;
  background: #38bdf8;
  border-radius: 2px;
  height: 4px;
}

.hm-winter-widget.music-playing .hm-wave-bar:nth-child(1) {
  animation: hmWaveAnim 0.7s infinite alternate ease-in-out;
}
.hm-winter-widget.music-playing .hm-wave-bar:nth-child(2) {
  animation: hmWaveAnim 0.5s infinite 0.15s alternate ease-in-out;
}
.hm-winter-widget.music-playing .hm-wave-bar:nth-child(3) {
  animation: hmWaveAnim 0.8s infinite 0.3s alternate ease-in-out;
}

@keyframes hmWaveAnim {
  0% { height: 3px; }
  100% { height: 13px; }
}

/* Floating Settings Panel (Dropdown Popover) */
.hm-winter-panel {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 0;
  width: 290px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 0 0 25px rgba(56, 189, 248, 0.15);
  padding: 18px 20px;
  color: #ffffff;
  display: none;
  animation: hmWinterPanelFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom left;
}

.hm-winter-panel.active {
  display: block;
}

@keyframes hmWinterPanelFade {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Panel Header */
.hm-winter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hm-winter-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.hm-winter-panel-title i {
  color: #38bdf8;
}

.hm-winter-panel-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}

.hm-winter-panel-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Control Row Item */
.hm-winter-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.hm-control-label-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hm-control-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
}

.hm-control-title {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.2;
}

.hm-control-subtitle {
  font-size: 11px;
  color: #94a3b8;
}

/* Minimalist Pill Toggle Switch */
.hm-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.hm-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.hm-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 30px;
}

.hm-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.hm-toggle-switch input:checked + .hm-toggle-slider {
  background-color: #0066ff;
  box-shadow: 0 0 12px rgba(0, 102, 255, 0.5);
}

.hm-toggle-switch input:checked + .hm-toggle-slider:before {
  transform: translateX(20px);
}

/* Volume Slider Row */
.hm-winter-volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-top: 10px;
}

.hm-volume-mute-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.hm-volume-mute-btn:hover {
  color: #38bdf8;
}

.hm-volume-range-input {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.hm-volume-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  transition: transform 0.15s;
}

.hm-volume-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Festive Footer Tag */
.hm-winter-panel-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #64748b;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Mobile Responsiveness for Control Widget */
@media (max-width: 768px) {
  .hm-winter-widget {
    bottom: 84px; /* Sits comfortably above sticky mobile booking bar */
    left: 16px;
  }
  .hm-winter-panel {
    width: 270px;
    left: 0;
  }
}

/* Respect Accessibility Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  #hm-winter-canvas {
    display: none !important;
  }
  .hm-header-action-badge::before {
    animation: none !important;
  }
}

