/* ==========================================================================
   Smart Home Repair - House Lighting Visualizer & Video Generator Styles
   ========================================================================== */

:root {
  --hv-gold: #d4af37;
  --hv-gold-glow: rgba(212, 175, 55, 0.35);
  --hv-gold-light: #ffd768;
  --hv-dark-bg: #070a11;
  --hv-panel-bg: rgba(15, 23, 42, 0.95);
  --hv-card-bg: rgba(255, 255, 255, 0.04);
  --hv-border: rgba(212, 175, 55, 0.25);
  --hv-border-subtle: rgba(255, 255, 255, 0.1);
  --hv-text-main: #f8fafc;
  --hv-text-muted: #94a3b8;
  --hv-uga-red: #ba0c2f;
  --hv-font-heading: 'Cinzel', serif, Georgia;
  --hv-font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Floating Trigger Pill on All Pages */
.hv-floating-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99998;
  background: linear-gradient(135deg, #162032 0%, #0b111e 100%);
  border: 1.5px solid var(--hv-gold);
  border-radius: 9999px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--hv-gold-glow);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: hv-pulse 3s infinite;
  text-decoration: none;
}

.hv-floating-trigger:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.6);
  border-color: var(--hv-gold-light);
}

.hv-trigger-icon {
  font-size: 20px;
  animation: hv-twinkle 2s infinite ease-in-out;
}

.hv-trigger-content {
  display: flex;
  flex-direction: column;
}

.hv-trigger-title {
  color: #ffffff;
  font-family: var(--hv-font-body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hv-trigger-subtitle {
  color: var(--hv-gold-light);
  font-size: 11px;
  font-weight: 600;
}

@keyframes hv-pulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--hv-gold-glow);
  }
  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 28px rgba(212, 175, 55, 0.6);
  }
}

@keyframes hv-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}

/* Modal Overlay */
.hv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hv-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Container */
.hv-modal-container {
  background: var(--hv-dark-bg);
  border: 1px solid var(--hv-border);
  border-radius: 16px;
  width: 100%;
  max-width: 1180px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 175, 55, 0.15);
  font-family: var(--hv-font-body);
  color: var(--hv-text-main);
}

/* Modal Header */
.hv-modal-header {
  padding: 18px 24px;
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid var(--hv-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hv-brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hv-brand-badge h3 {
  font-family: var(--hv-font-heading);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin: 0;
}

.hv-brand-badge span {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--hv-gold-light);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hv-close-btn {
  background: transparent;
  border: 1px solid var(--hv-border-subtle);
  color: var(--hv-text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.hv-close-btn:hover {
  border-color: var(--hv-gold);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Main Body Layout */
.hv-modal-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex-grow: 1;
  overflow: hidden;
  height: calc(94vh - 65px);
}

@media (max-width: 900px) {
  .hv-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    overflow-y: auto;
  }
}

/* Sidebar Controls */
.hv-sidebar {
  background: var(--hv-panel-bg);
  border-right: 1px solid var(--hv-border-subtle);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hv-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--hv-gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.hv-card {
  background: var(--hv-card-bg);
  border: 1px solid var(--hv-border-subtle);
  border-radius: 10px;
  padding: 14px;
}

/* Upload Dropzone */
.hv-dropzone {
  border: 2px dashed rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  transition: all 0.2s;
}

.hv-dropzone:hover {
  border-color: var(--hv-gold);
  background: rgba(212, 175, 55, 0.05);
}

.hv-dropzone input[type="file"] {
  display: none;
}

.hv-dropzone-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.hv-dropzone-text {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.hv-dropzone-hint {
  font-size: 10px;
  color: var(--hv-text-muted);
  margin-top: 4px;
}

.hv-sample-btn {
  margin-top: 8px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hv-border-subtle);
  color: var(--hv-gold-light);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.hv-sample-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--hv-gold);
}

/* Preset Cards */
.hv-preset-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hv-preset-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hv-border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.hv-preset-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(255, 255, 255, 0.03);
}

.hv-preset-card.active {
  border-color: var(--hv-gold);
  background: rgba(212, 175, 55, 0.12);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.hv-preset-info {
  display: flex;
  flex-direction: column;
}

.hv-preset-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.hv-preset-desc {
  font-size: 10px;
  color: var(--hv-text-muted);
}

.hv-preset-swatch {
  display: flex;
  gap: 4px;
}

.hv-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

/* Sliders */
.hv-slider-row {
  margin-top: 10px;
}

.hv-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--hv-text-muted);
  margin-bottom: 4px;
}

.hv-slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--hv-gold);
  cursor: pointer;
}

/* Stage Area (Canvas & Video Player) */
.hv-stage-area {
  background: #030508;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.hv-canvas-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--hv-border);
}

#hvStageCanvas {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

/* Before / After Split Slider */
.hv-split-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--hv-gold);
  box-shadow: 0 0 10px var(--hv-gold);
  cursor: ew-resize;
  z-index: 10;
  display: none;
}

.hv-split-slider.active {
  display: block;
}

.hv-split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: #070a11;
  border: 2px solid var(--hv-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hv-gold-light);
  font-size: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

/* Stage Action Bottom Bar */
.hv-stage-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  gap: 12px;
  flex-wrap: wrap;
}

.hv-btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #aa8420 100%);
  color: #070a11;
  font-weight: 800;
  font-size: 13px;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

.hv-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.55);
}

.hv-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hv-border-subtle);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.hv-btn-secondary:hover {
  border-color: var(--hv-gold);
  color: var(--hv-gold-light);
}

/* Video Render Progress & Lead Gate Overlay */
.hv-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 17, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  text-align: center;
}

.hv-video-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.hv-lead-form {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--hv-border);
  border-radius: 12px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.hv-form-title {
  font-family: var(--hv-font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.hv-form-subtitle {
  font-size: 12px;
  color: var(--hv-text-muted);
}

.hv-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hv-form-group label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}

.hv-form-group input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--hv-border-subtle);
  border-radius: 6px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
}

.hv-form-group input:focus {
  border-color: var(--hv-gold);
}

/* Video Player Container */
.hv-video-player-container {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
}

.hv-video-player-container.active {
  display: flex;
}

.hv-video-element {
  width: 100%;
  max-height: 65vh;
  border-radius: 10px;
  border: 1.5px solid var(--hv-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px var(--hv-gold-glow);
  background: #000;
}

/* Progress Bar */
.hv-progress-container {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0;
}

.hv-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d4af37, #ffd768);
  border-radius: 999px;
  transition: width 0.1s linear;
}
