/* ============================================================
   Archipelbouwadvies Energielabel Widget — neutrale CSS
   Kleuren en fonts worden zoveel mogelijk geërfd van het thema.
   Alleen structuur, positionering en functionele kleuren staan hier.
   ============================================================ */

.rz-widget {
  font-size: 15px;
  max-width: 560px;
  width: 100%;
}

/* Titel verbergen via klasse (pagina's waar titel al aanwezig is) */
#energielabel-widget.rz-no-title .rz-title,
#energielabel-widget.rz-no-title .rz-subtitle {
  display: none !important;
}

/* ── Stap-container ──────────────────────────────────────── */
.rz-step {
  width: 100%;
}

.rz-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.rz-subtitle {
  margin: 0 0 24px;
  line-height: 1.5;
  opacity: 0.75;
}

/* ── Autocomplete ────────────────────────────────────────── */
.rz-autocomplete {
  position: relative;
  margin-bottom: 20px;
}

.rz-label-text {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rz-input-wrap {
  position: relative;
}

.rz-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.rz-textarea {
  resize: vertical;
  min-height: 90px;
}

/* Spinner */
.rz-spinner {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: rz-spin 0.7s linear infinite;
}

@keyframes rz-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Suggestielijst */
.rz-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  max-height: 240px;
  overflow-y: auto;
}

.rz-suggestion {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
}

.rz-suggestion:hover {
  background: rgba(0,0,0,0.05);
}

/* ── Label card ──────────────────────────────────────────── */
.rz-label-card {
  margin-bottom: 20px;
}

.rz-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 16px 20px;
}

.rz-label-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

.rz-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rz-card-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  gap: 8px;
}

.rz-card-row span,
.rz-prijs-label {
  opacity: 0.65;
}

/* Geldigheid tags — functionele kleuren (NL standaard) */
.rz-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  justify-content: flex-start;
}

.rz-tag--groen  { background: #edf3e5; color: #2d5a1b; }
.rz-tag--oranje { background: #fef3e2; color: #92400e; }
.rz-tag--rood   { background: #fde8e8; color: #b91c1c; }

/* ── Melding (geen label / buiten regio) ─────────────────── */
.rz-melding {
  background: rgba(0,0,0,0.04);
  border-left: 3px solid rgba(0,0,0,0.2);
  border-radius: 0 6px 6px 0;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.55;
}

.rz-melding p {
  margin: 0 0 4px;
}

.rz-melding p:last-child {
  margin: 0;
}

/* ── Knoppen ─────────────────────────────────────────────── */
:root { --ew-primary: #555555; }

.rz-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  background: var(--ew-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  transition: opacity 0.2s;
}

.rz-btn:hover { opacity: 0.85; }

.rz-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rz-btn--outline {
  background: transparent !important;
  color: var(--ew-primary) !important;
  border: 2px solid var(--ew-primary) !important;
  margin-top: 8px;
}

.rz-btn--outline:hover {
  background: var(--ew-primary) !important;
  color: #fff !important;
  opacity: 1;
}

/* ── Terug-knop ──────────────────────────────────────────── */
.rz-terug {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 16px 6px 10px !important;
  margin-bottom: 16px;
  display: inline-block;
  white-space: nowrap !important;
  width: auto !important;
  min-width: 100px !important;
  border-radius: 0 !important;
  opacity: 0.75;
}

.rz-terug:hover {
  opacity: 1;
  background: none !important;
}

/* ── Samenvatting stap 2 ─────────────────────────────────── */
.rz-samenvatting {
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 14px;
}

.rz-sum-row {
  padding: 3px 0;
  line-height: 1.4;
}

/* ── Formuliervelden ─────────────────────────────────────── */
.rz-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rz-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Foutmelding ─────────────────────────────────────────── */
.rz-error {
  background: #fde8e8;
  border: 1px solid #f5b8b8;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: #b91c1c;
}

/* ── Successkerm ─────────────────────────────────────────── */
.rz-succes-stap {
  text-align: center;
  padding: 32px 16px;
}

.rz-succes-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  background: rgba(0,0,0,0.08);
}

/* ── Responsief ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .rz-title { font-size: 19px; }

  .rz-card-inner {
    flex-direction: column;
    gap: 12px;
  }

  .rz-label-badge {
    width: 44px;
    height: 44px;
    font-size: 15px;
  }
}
