/*
  termin.css — LuigiVelo.ch
  Estilos modernos y específicos para la página de Terminbuchung.
  Pensado para integrarse con core.css (no lo sustituye).
*/

/* CONTENEDOR PRINCIPAL -------------------------------------------- */

.termin-container {
  max-width: 960px;
  margin: 3rem auto 4rem;
  padding: 2.25rem 2.5rem 2.75rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.03);
}

@media (max-width: 768px) {
  .termin-container {
    margin: 1.5rem 1rem 2.5rem;
    padding: 1.75rem 1.25rem 2rem;
    border-radius: 10px;
  }
}

/* TITULOS Y TEXTOS ------------------------------------------------ */

.termin-container h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.termin-container .lead {
  font-size: 0.98rem;
  color: #4b5563;
  margin-bottom: 1.75rem;
}

.termin-container h2 {
  font-size: 1.15rem;
  margin-top: 1.6rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.termin-container h3 {
  font-size: 1.02rem;
  margin-top: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* FORM LAYOUT BÁSICO ---------------------------------------------- */

#termin-form {
  margin-top: 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group-inline {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .form-group-inline {
    grid-template-columns: 1fr;
  }
}

/* LABELS ---------------------------------------------------------- */

#termin-form label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
  display: inline-block;
  margin-bottom: 0.35rem;
}

/* INPUTS / SELECT / TEXTAREA -------------------------------------- */

#termin-form input[type="text"],
#termin-form input[type="email"],
#termin-form input[type="tel"],
#termin-form input[type="number"],
#termin-form select,
#termin-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background-color 0.16s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

#termin-form textarea {
  min-height: 110px;
  resize: vertical;
}

/* Foco accesible y limpio */
#termin-form input:focus,
#termin-form select:focus,
#termin-form textarea:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.35);
  background-color: #f9fffb;
}

/* RADIO BUTTONS – VELOTYP & ANFAHRT ------------------------------- */

.form-group input[type="radio"] {
  /* dejamos el radio visible pero mejoramos estilo */
  accent-color: #16a34a; /* soporte moderno */
  margin-right: 0.35rem;
  transform: scale(1.02);
}

.form-group > label {
  margin-right: 1.25rem;
  cursor: pointer;
}

/* SERVICE-OPTIONS COMO TARJETAS ----------------------------------- */

.service-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .service-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.service-option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease, transform 0.12s ease;
}

.service-option input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.service-option span {
  pointer-events: none;
}

/* estado hover/focus */
.service-option:hover {
  border-color: #9ca3af;
  background: #f3f4f6;
}

/* estado checked */
.service-option input[type="radio"]:checked + span {
  font-weight: 600;
}

.service-option input[type="radio"]:checked ~ span {
  color: #065f46;
}

.service-option input[type="radio"]:checked + span,
.service-option input[type="radio"]:checked ~ span {
  /* card resaltada */
}

.service-option input[type="radio"]:checked ~ span::before {
  content: "";
}

/* truco: aplicamos estilo al contenedor cuando el radio está checked */
.service-option:has(input[type="radio"]:checked) {
  border-color: #16a34a;
  background: #ecfdf3;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2);
  transform: translateY(-1px);
}

/* fallback para navegadores sin :has (simplemente mantenemos el estilo base) */
@supports not (selector(:has(*))) {
  .service-option:focus-within {
    border-color: #16a34a;
    background: #ecfdf3;
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2);
  }
}

/* PANEL: WAS IST IN DIESEM SERVICE ENTHALTEN? --------------------- */

.service-info {
  background: #f4fdf4;
  border-radius: 10px;
  border: 1px solid rgba(22, 163, 74, 0.25);
  padding: 1rem 1.1rem 1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.service-info.hidden {
  display: none;
}

.service-info h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

#service-info-content p {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  color: #374151;
}

#service-info-content ul {
  margin: 0.3rem 0 0.2rem 1.3rem;
  padding: 0;
}

#service-info-content li {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

/* BLOQUES WERKSTATT / ABHOLUNG ------------------------------------ */

#werkstatt-block,
#abholung-block {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  margin-bottom: 0.75rem;
}

#werkstatt-block h3,
#abholung-block h3 {
  margin-top: 0;
}

#werkstatt-block .form-group,
#abholung-block .form-group {
  margin-bottom: 0.85rem;
}

#abholung-block .note {
  font-size: 0.86rem;
  color: #4b5563;
  margin-bottom: 0.75rem;
}

/* CAJA DE PRECIO --------------------------------------------------- */

.preis-box {
  margin-top: 1.6rem;
  padding: 1.1rem 1.2rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.preis-box h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
}

.preis-box p {
  margin: 0.25rem 0;
  font-size: 0.94rem;
}

#preis-total {
  margin-top: 0.45rem;
  font-weight: 700;
  color: #065f46;
}

.preis-hinweis {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: #6b7280;
}

/* FEEDBACK / MENSAJES --------------------------------------------- */

#feedback {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #b91c1c; /* error */
}

/* si en el futuro usas esta clase desde JS */
#feedback.success {
  color: #065f46;
}

/* BOTON PRINCIPAL -------------------------------------------------- */

.btn-prim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.7rem;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(21, 128, 61, 0.22),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  transition: transform 0.1s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-prim:hover {
  background: linear-gradient(135deg, #15803d, #166534);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(21, 128, 61, 0.28),
    0 0 0 1px rgba(15, 23, 42, 0.05);
}

.btn-prim:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(21, 128, 61, 0.24),
    0 0 0 1px rgba(15, 23, 42, 0.05);
}

.btn-prim:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

/* RESPONSIVE AJUSTES FINALES -------------------------------------- */

@media (max-width: 480px) {
  .termin-container h1 {
    font-size: 1.6rem;
  }

  .termin-container .lead {
    font-size: 0.9rem;
  }

  .btn-prim {
    width: 100%;
  }
}
