/* vallasled-modals.css - Modern form modals for VallasLED */
:root {
  --vlm-bg: #0b1120;
  --vlm-card-bg: rgba(15, 23, 42, 0.96);
  --vlm-border: rgba(255, 255, 255, 0.12);
  --vlm-blue: #00d2ff;
  --vlm-green: #00ff66;
  --vlm-orange: #ff7a00;
  --vlm-purple: #cc00ff;
  --vlm-text: #ffffff;
  --vlm-muted: rgba(255, 255, 255, 0.72);
}

.vlm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99995;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  font-family: Poppins, system-ui, -apple-system, sans-serif;
}

.vlm-overlay.is-active {
  display: flex;
}

.vlm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 15, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.vlm-container {
  position: relative;
  width: min(100%, 540px);
  max-height: calc(100vh - 32px);
  background: var(--vlm-card-bg);
  color: var(--vlm-text);
  border: 1px solid var(--vlm-border);
  border-radius: 26px;
  padding: 28px 24px;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vlm-container::-webkit-scrollbar {
  width: 6px;
}
.vlm-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

/* Header */
.vlm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.vlm-header-content {
  min-width: 0;
}

.vlm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.vlm-badge-green {
  background: rgba(0, 255, 102, 0.12);
  color: var(--vlm-green);
  border: 1px solid rgba(0, 255, 102, 0.3);
}
.vlm-badge-orange {
  background: rgba(255, 122, 0, 0.12);
  color: var(--vlm-orange);
  border: 1px solid rgba(255, 122, 0, 0.3);
}

.vlm-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.vlm-subtitle {
  margin: 6px 0 0 0;
  font-size: 0.88rem;
  color: var(--vlm-muted);
}

.vlm-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.vlm-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Progress bar */
.vlm-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: -6px;
}
.vlm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d2ff, #00ff66);
  width: 33%;
  transition: width 0.3s ease;
}
.vlm-progress-fill.orange {
  background: linear-gradient(90deg, #ff7a00, #ffee00);
}

/* Form steps */
.vlm-step {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.vlm-step.is-active {
  display: flex;
}

/* Inputs & Labels */
.vlm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vlm-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f1f5f9;
}
.vlm-label small {
  font-size: 0.8rem;
  color: var(--vlm-muted);
  font-weight: 400;
}

.vlm-input,
.vlm-select,
.vlm-textarea {
  width: 100%;
  box-sizing: border-box;
  background-color: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 16px; /* Prevents iOS auto-zoom */
  font-family: inherit;
  opacity: 1 !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Chrome / Safari / Edge Autofill Fix: Prevents white background and invisible white text */
.vlm-input:-webkit-autofill,
.vlm-input:-webkit-autofill:hover, 
.vlm-input:-webkit-autofill:focus, 
.vlm-input:-webkit-autofill:active,
.vlm-textarea:-webkit-autofill,
.vlm-select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
  box-shadow: 0 0 0 1000px #1e293b inset !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
}

.vlm-input::placeholder,
.vlm-textarea::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.45) !important;
  opacity: 1 !important;
}

.vlm-input:focus,
.vlm-select:focus,
.vlm-textarea:focus {
  outline: none;
  border-color: var(--vlm-blue);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
  background-color: #1e293b !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.vlm-textarea {
  resize: vertical;
  min-height: 85px;
}

/* Selectable options grid */
.vlm-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 480px) {
  .vlm-options-grid {
    grid-template-columns: 1fr;
  }
}

.vlm-option-card {
  position: relative;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  transition: all 0.2s;
  user-select: none;
}
.vlm-option-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.25);
}
.vlm-option-card input[type="radio"],
.vlm-option-card input[type="checkbox"] {
  accent-color: var(--vlm-green);
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}
.vlm-option-card.is-selected {
  border-color: var(--vlm-green);
  background: rgba(0, 255, 102, 0.08);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.2);
}
.vlm-option-card.is-selected.orange {
  border-color: var(--vlm-orange);
  background: rgba(255, 122, 0, 0.08);
  box-shadow: 0 0 12px rgba(255, 122, 0, 0.2);
}

/* Diagnostic yes/no pills */
.vlm-diagnostics-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vlm-diagnostic-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 10px;
}
.vlm-diag-question {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}
.vlm-diag-btns {
  display: inline-flex;
  gap: 6px;
}
.vlm-diag-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.vlm-diag-btn.active-yes {
  background: var(--vlm-green);
  border-color: var(--vlm-green);
  color: #000;
}
.vlm-diag-btn.active-no {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* File upload zone */
.vlm-upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  background: rgba(30, 41, 59, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}
.vlm-upload-zone:hover {
  border-color: var(--vlm-orange);
  background: rgba(30, 41, 59, 0.5);
}
.vlm-upload-zone input[type="file"] {
  display: none;
}
.vlm-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.vlm-preview-chip {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: #e2e8f0;
}

/* Actions & Buttons */
.vlm-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.vlm-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  text-transform: uppercase;
  text-decoration: none;
}
.vlm-btn-primary {
  background: var(--vlm-green);
  color: #001018;
  box-shadow: 0 4px 18px rgba(0, 255, 102, 0.35);
}
.vlm-btn-primary:hover {
  background: #00ff88;
  transform: translateY(-1px);
}
.vlm-btn-orange {
  background: var(--vlm-orange);
  color: #000;
  box-shadow: 0 4px 18px rgba(255, 122, 0, 0.35);
}
.vlm-btn-orange:hover {
  background: #ff8c1a;
  transform: translateY(-1px);
}

.vlm-btn-whatsapp {
  background: #25d366 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45) !important;
}
.vlm-btn-whatsapp:hover {
  background: #20bd5a !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6) !important;
}
.vlm-btn-whatsapp svg {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.vlm-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  flex: 0 0 auto;
  min-width: 100px;
}
.vlm-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Confirmation state */
.vlm-confirm-box {
  text-align: center;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.vlm-confirm-icon {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: rgba(0, 255, 102, 0.15);
  border: 2px solid var(--vlm-green);
  color: var(--vlm-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.vlm-confirm-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}
.vlm-confirm-msg {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--vlm-muted);
  max-width: 420px;
}
.vlm-confirm-code {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--vlm-blue);
  letter-spacing: 0.5px;
}
