/* ==========================================================================
   Gas Price Alerts — BEM con design tokens
   ========================================================================== */

/* Overlay */
.est-alert__overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
  animation: gpa-fade-in 0.2s ease;
}
.est-alert__overlay[hidden] { display: none; }

@keyframes gpa-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal */
.est-alert__modal {
  position: relative;
  background: #fff;
  border-radius: var(--gas-radius-md, 8px);
  padding: 28px 24px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--gas-shadow-lg, 0 10px 15px rgba(0, 0, 0, 0.1));
  animation: gpa-slide-up 0.25s ease;
}

@keyframes gpa-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Close button */
.est-alert__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gas-gray-400, #607d8b);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.est-alert__close:hover { color: var(--gas-gray-800, #333); }

/* Title + subtitle */
.est-alert__title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gas-text-primary, #333);
}

.est-alert__subtitle {
  margin: 0 0 20px;
  font-size: 0.875rem;
  color: var(--gas-text-secondary, rgb(106, 109, 117));
  line-height: 1.4;
}

/* Fuel chips */
.est-alert__fuels {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.est-alert__chip {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.est-alert__chip-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.est-alert__chip-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  border: 2px solid var(--gas-gray-200, #ccc);
  border-radius: var(--gas-radius-md, 8px);
  background: #fff;
  transition: var(--gas-transition-fast, all 0.15s ease);
  text-align: center;
}

.est-alert__chip-input:checked + .est-alert__chip-inner {
  border-color: var(--gas-orange, #f26800);
  background: #fff5f0;
}

.est-alert__chip-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gas-text-primary, #333);
  line-height: 1.2;
}

.est-alert__chip-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gas-orange, #f26800);
  margin-top: 2px;
}

/* Per-fuel accent colors when checked */
.est-alert__chip--regular .est-alert__chip-input:checked + .est-alert__chip-inner {
  border-color: #2e7d32;
  background: #e8f5e9;
}
.est-alert__chip--regular .est-alert__chip-input:checked + .est-alert__chip-inner .est-alert__chip-price {
  color: #2e7d32;
}

.est-alert__chip--premium .est-alert__chip-input:checked + .est-alert__chip-inner {
  border-color: #d32f2f;
  background: #ffebee;
}
.est-alert__chip--premium .est-alert__chip-input:checked + .est-alert__chip-inner .est-alert__chip-price {
  color: #d32f2f;
}

.est-alert__chip--diesel .est-alert__chip-input:checked + .est-alert__chip-inner {
  border-color: #1a1a1a;
  background: #f5f5f5;
}
.est-alert__chip--diesel .est-alert__chip-input:checked + .est-alert__chip-inner .est-alert__chip-price {
  color: #1a1a1a;
}

/* Fuel hint */
.est-alert__fuel-hint {
  margin: -8px 0 14px;
  font-size: 0.7em;
  color: var(--gas-gray-300, #999);
  text-align: center;
  font-style: italic;
}

/* Email input */
.est-alert__input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gas-gray-200, #ccc);
  border-radius: var(--gas-radius-md, 8px);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--gas-text-primary, #333);
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}
.est-alert__input:focus {
  border-color: var(--gas-orange, #f26800);
  box-shadow: 0 0 0 3px rgba(242, 104, 0, 0.15);
}
.est-alert__input::placeholder { color: var(--gas-gray-300, #999); }

/* Honeypot */
.est-alert__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Privacy checkbox */
.est-alert__privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 16px;
  font-size: 0.8125rem;
  color: var(--gas-text-secondary, rgb(106, 109, 117));
  cursor: pointer;
  line-height: 1.4;
}
.est-alert__privacy input {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--gas-orange, #f26800);
}

/* Submit button */
.est-alert__submit {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--gas-radius-md, 8px);
  background: var(--gas-orange, #f26800);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--gas-transition-fast, all 0.15s ease);
}
.est-alert__submit:hover { filter: brightness(0.95); }
.est-alert__submit:active { transform: scale(0.98); }
.est-alert__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Feedback message */
.est-alert__message {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--gas-radius-md, 8px);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}
.est-alert__message[hidden] { display: none; }
.est-alert__message.is-success {
  background: #e8f5e9;
  color: #2e7d32;
}
.est-alert__message.is-error {
  background: #ffebee;
  color: #d32f2f;
}