/* ===========================
   Speed Camera Guidance Tool
   =========================== */

.scg-tool {
  max-width: 520px;
  margin: 20px auto;
  padding: 20px 18px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Headings */
.scg-tool h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #1f2937;
}

/* ===========================
   Form
   =========================== */

#scg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#scg-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  color: #374151;
  gap: 6px;
}

#scg-form select {
  appearance: none;
  padding: 14px 12px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  color: #111827;
}

#scg-form select:focus {
  outline: none;
  border-color: #2563eb;
  background-color: #ffffff;
}

#scg-form button {
  margin-top: 10px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
}

#scg-form button:hover {
  background: #1d4ed8;
}

/* ===========================
   Result container
   =========================== */

.scg-result {
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.scg-green {
  background: #ecfdf5;
  border-left: 6px solid #10b981;
  color: #065f46;
}

.scg-amber {
  background: #fffbeb;
  border-left: 6px solid #f59e0b;
  color: #92400e;
}

.scg-red {
  background: #fef2f2;
  border-left: 6px solid #ef4444;
  color: #7f1d1d;
}

/* ===========================
   Legend (mobile-safe)
   =========================== */

.scg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.75rem;
  color: #6b7280;
}

.scg-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.scg-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.scg-legend .dot.green {
  background-color: #10b981;
}

.scg-legend .dot.amber {
  background-color: #f59e0b;
}

.scg-legend .dot.red {
  background-color: #ef4444;
}

/* ===========================
   Reset button
   =========================== */

#scg-reset {
  margin-top: 16px;
  padding: 12px;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
}

#scg-reset:hover {
  background: #f9fafb;
}

/* ===========================
   Disclaimer
   =========================== */

.scg-disclaimer {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
}

/* ===========================
   Desktop spacing tweak only
   =========================== */

@media (min-width: 768px) {
  .scg-tool {
    padding: 26px 28px;
  }
}


.scg-result-link {
  font-size: 0.9rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.scg-result-link:hover {
  text-decoration: underline;
}

.scg-tool-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.scg-tool-icon {
  width: 28px;
  height: auto;
  flex-shrink: 0;
}
.scg-tool-intro {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 16px;
}

/* OPTIN FORM */

.scg-optin-box {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.scg-optin-box h3 {
    margin-top: 0;
}

.scg-optin-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scg-optin-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 10px;
}

.scg-optin-form button {
    padding: 10px 16px;
    border-radius: 6px;
}

.scg-optin--green {
    border-left: 4px solid #22c55e;
}

.scg-optin--amber {
    border-left: 4px solid #f59e0b;
}

.scg-optin--red {
    border-left: 4px solid #ef4444;
}


/* UNSUBSCRIBE  */
.scg-unsubscribe-box {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}

/* Opt-in success / error messages */
.scg-optin-message {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Success */
.scg-optin-message.success {
    background: #ecfdf5;          /* pale green */
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* Error */
.scg-optin-message.error {
    background: #fef2f2;          /* pale red */
    border: 1px solid #fecaca;
    color: #7f1d1d;
}
