/* HD Windows - Intelligent Quote Assistant Stylesheet */
:root {
  --hdw-primary: #0f172a;
  --hdw-primary-hover: #1e293b;
  --hdw-accent: #c5a059;
  --hdw-accent-hover: #b08d46;
  --hdw-accent-light: rgba(197, 160, 89, 0.12);
  --hdw-surface: #ffffff;
  --hdw-bg-muted: #f8fafc;
  --hdw-border: #e2e8f0;
  --hdw-text: #0f172a;
  --hdw-text-muted: #64748b;
  --hdw-success: #10b981;
  --hdw-success-bg: #ecfdf5;
  --hdw-shadow-lg: 0 20px 35px -5px rgba(0, 0, 0, 0.18), 0 10px 15px -5px rgba(0, 0, 0, 0.08);
  --hdw-radius: 14px;
}

/* Floating Launcher Pill */
.hdw-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border: 1.5px solid rgba(197, 160, 89, 0.5);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
  padding: 13px 22px;
  border-radius: 50px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.2px;
}
.hdw-launcher:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 30px rgba(197, 160, 89, 0.25), 0 8px 16px rgba(0,0,0,0.2);
  border-color: var(--hdw-accent);
}
.hdw-launcher-sparkle {
  color: var(--hdw-accent);
  font-size: 16px;
  animation: hdw-pulse 2s infinite ease-in-out;
}
@keyframes hdw-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* Modal Backdrop */
.hdw-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.hdw-backdrop.hdw-active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Window */
.hdw-modal {
  background: var(--hdw-surface);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  border-radius: var(--hdw-radius);
  box-shadow: var(--hdw-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--hdw-text);
  border: 1px solid var(--hdw-border);
}
.hdw-backdrop.hdw-active .hdw-modal {
  transform: translateY(0) scale(1);
}

/* Header */
.hdw-header {
  padding: 18px 24px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--hdw-accent);
}
.hdw-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hdw-header-logo {
  height: 28px;
  width: auto;
}
.hdw-header-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}
.hdw-header-subtitle {
  font-size: 11px;
  color: var(--hdw-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.hdw-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hdw-lang-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
}
.hdw-lang-select option {
  background: #0f172a;
  color: #fff;
}
.hdw-close-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.hdw-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Progress Indicator */
.hdw-progress-wrap {
  background: #f1f5f9;
  padding: 10px 24px;
  border-bottom: 1px solid var(--hdw-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--hdw-text-muted);
}
.hdw-progress-bar-bg {
  height: 5px;
  background: #e2e8f0;
  width: 100%;
  position: relative;
}
.hdw-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hdw-accent) 0%, #d4af37 100%);
  width: 25%;
  transition: width 0.35s ease;
}

/* Body / Steps Container */
.hdw-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.hdw-step {
  display: none;
  animation: hdw-fade-in 0.25s ease;
}
.hdw-step.hdw-step-active {
  display: block;
}
@keyframes hdw-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hdw-step-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--hdw-primary);
  margin: 0 0 6px 0;
}
.hdw-step-desc {
  font-size: 13.5px;
  color: var(--hdw-text-muted);
  margin: 0 0 20px 0;
  line-height: 1.45;
}

/* Option Cards Grid */
.hdw-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.hdw-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.hdw-card-option {
  border: 1.5px solid var(--hdw-border);
  border-radius: 10px;
  padding: 16px 14px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  position: relative;
  user-select: none;
}
.hdw-card-option:hover {
  border-color: var(--hdw-accent);
  background: var(--hdw-bg-muted);
  transform: translateY(-2px);
}
.hdw-card-option.hdw-selected {
  border-color: var(--hdw-accent);
  background: var(--hdw-accent-light);
  box-shadow: 0 0 0 1px var(--hdw-accent);
}
.hdw-card-icon {
  font-size: 24px;
  margin-bottom: 8px;
}
.hdw-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--hdw-primary);
  margin-bottom: 4px;
}
.hdw-card-desc {
  font-size: 12px;
  color: var(--hdw-text-muted);
  line-height: 1.35;
}

/* Chips selection */
.hdw-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.hdw-chip {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--hdw-border);
  background: #ffffff;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hdw-text);
  transition: all 0.2s;
  user-select: none;
}
.hdw-chip:hover {
  border-color: var(--hdw-accent);
  background: var(--hdw-bg-muted);
}
.hdw-chip.hdw-selected {
  border-color: var(--hdw-accent);
  background: var(--hdw-accent);
  color: #ffffff;
}

/* Form Fields */
.hdw-field-group {
  margin-bottom: 16px;
}
.hdw-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--hdw-primary);
  margin-bottom: 6px;
}
.hdw-label span.hdw-required {
  color: #dc2626;
  margin-left: 2px;
}
.hdw-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--hdw-border);
  font-size: 14px;
  color: var(--hdw-text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.hdw-input:focus {
  border-color: var(--hdw-accent);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}
.hdw-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* File Upload Zone */
.hdw-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.hdw-upload-zone:hover {
  border-color: var(--hdw-accent);
  background: #f1f5f9;
}
.hdw-upload-icon {
  font-size: 26px;
  color: var(--hdw-accent);
  margin-bottom: 4px;
}
.hdw-upload-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--hdw-primary);
  margin-bottom: 2px;
}
.hdw-upload-subtext {
  font-size: 11.5px;
  color: var(--hdw-text-muted);
}
.hdw-file-input {
  display: none;
}
.hdw-file-preview {
  display: none;
  margin-top: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--hdw-border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--hdw-primary);
  justify-content: space-between;
  align-items: center;
}

/* Consent Box */
.hdw-consent-box {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px solid var(--hdw-border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hdw-checkbox {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--hdw-accent);
  cursor: pointer;
}
.hdw-consent-text {
  font-size: 12px;
  color: var(--hdw-text-muted);
  line-height: 1.4;
}
.hdw-consent-text a {
  color: var(--hdw-accent);
  text-decoration: underline;
}

/* Honeypot hidden field */
.hdw-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Error banner */
.hdw-error-msg {
  display: none;
  padding: 10px 14px;
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
  font-size: 13px;
  border-radius: 6px;
  margin-bottom: 14px;
}

/* Footer / Navigation */
.hdw-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--hdw-border);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hdw-btn-back {
  background: transparent;
  border: 1px solid var(--hdw-border);
  color: var(--hdw-text-muted);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.hdw-btn-back:hover {
  background: #f1f5f9;
  color: var(--hdw-primary);
}
.hdw-btn-next {
  background: var(--hdw-accent);
  border: none;
  color: #ffffff;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hdw-btn-next:hover {
  background: var(--hdw-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}
.hdw-btn-next:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Success Step (Step 5) */
.hdw-success-wrap {
  text-align: center;
  padding: 16px 8px;
}
.hdw-success-icon {
  width: 60px;
  height: 60px;
  background: var(--hdw-success-bg);
  border: 2px solid var(--hdw-success);
  color: var(--hdw-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px auto;
}
.hdw-lead-card {
  background: #f8fafc;
  border: 1.5px solid var(--hdw-border);
  border-radius: 10px;
  padding: 16px;
  margin: 18px 0;
  text-align: left;
}
.hdw-lead-id-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--hdw-border);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.hdw-lead-badge {
  background: #0f172a;
  color: var(--hdw-accent);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.hdw-priority-badge {
  background: #ecfdf5;
  color: #065f46;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.hdw-lead-summary-text {
  font-size: 13px;
  color: var(--hdw-text);
  line-height: 1.5;
  white-space: pre-line;
}
.hdw-whatsapp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #25d366;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  box-sizing: border-box;
}
.hdw-whatsapp-action:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}
.hdw-secondary-notice {
  font-size: 12px;
  color: var(--hdw-text-muted);
  margin-top: 14px;
  line-height: 1.4;
}

/* Spinner */
.hdw-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: hdw-spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes hdw-spin {
  to { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .hdw-input {
    font-size: 16px !important; /* Prevents unwanted iOS Safari viewport zoom */
  }
  .hdw-launcher {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }
  .hdw-modal {
    max-height: 94vh;
    border-radius: 12px;
  }
  .hdw-header {
    padding: 14px 18px;
  }
  .hdw-body {
    padding: 18px 16px;
  }
  .hdw-footer {
    padding: 12px 16px;
  }
  .hdw-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hdw-grid-3 {
    grid-template-columns: 1fr;
  }
  .hdw-row-2 {
    grid-template-columns: 1fr;
  }
}

