body#Form_contrato_body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 20px;
}

.Form_contrato_container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: 900px;
  margin: 0 auto;
  margin-top: 20px;
  gap: 2rem;
}


.Form_contrato_info {
  flex: 0 0 auto;
  max-width: 300px;
}

.Form_contrato_form_column {
  flex: 1;
}

/* Títulos */
.Form_contrato_section h2 {
  font-size: 22px;
  margin-bottom: 15px;
  border-bottom: 2px solid #0058b7;
  padding-bottom: 5px;
}

.Form_contrato_section h3 {
  font-size: 18px;
  margin-top: 25px;
  margin-bottom: 10px;
  color: #444;
}

.Form_contrato_subsection {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-top: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Labels e inputs */
.Form_contrato_section label {
  font-weight: bold;
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  color: #333;
}

.Form_contrato_section input,
.Form_contrato_section select,
.Form_contrato_section textarea {
  width: 100%;
  padding: 10px;
  margin-top: 3px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  transition: border 0.2s;
}

.Form_contrato_section input:focus,
.Form_contrato_section select:focus,
.Form_contrato_section textarea:focus {
  border-color: #007bff;
  outline: none;
}

/* Filas de inputs */
.Form_contrato_row {
  display: flex;
  gap: 20px;
}

/* Todos los form-group se expanden por defecto */
.Form_contrato_row .form-group {
  flex: 1 1 auto;
}

.Form_contrato_row .form-group.form-hausnummer {
  flex: 0 0 160px;
  /* antes 120px */
  max-width: 160px;
}

.Form_contrato_row .form-group.form-plz {
  flex: 0 0 110px;
  max-width: 110px;
}

/* Hausnummer: tamaño fijo */
.form-hausnummer input {
  width: 100%;
  max-width: 160px;
}

/* PLZ: más pequeñito */
.form-plz input {
  width: 100%;
  max-width: 110px;
}

/* Contenedor para cada campo */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

/* El input */
.form-group input {
  width: 100%;
  padding: 1rem 0.5rem 0.5rem;
  /* espacio arriba para el label flotante */
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #0077ff;
  /* azulito simpático */
}

/* El label */
.form-group label {
  position: absolute;
  left: 0.75rem;
  top: 1rem;
  font-size: 1rem;
  color: #888;
  pointer-events: none;
  transition: 0.2s ease all;
  margin: 0;
  /* 👈 resetea el margin heredado */
  font-weight: normal;
  /* 👈 evita el bold heredado */
}


/* Cuando el input está enfocado o lleno */
.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label {
  top: 0.3rem;
  left: 0.6rem;
  font-size: 0.75rem;
  color: #0077ff;
}

/* Contenedor del select para mantener consistencia con los form-group */
.form-group select {
  padding: 12px 15px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover y foco */
.form-group select:hover,
.form-group select:focus {
  border-color: #007bff;
  background-color: #eef5ff;
  outline: none;
}

/* Label flotante: solo para inputs, no select */
.form-group select+label {
  display: block;
  position: static;
  /* evita posicionamiento absoluto */
  margin-top: 6px;
  /* margen normal */
  font-size: 0.9rem;
  color: #666;
}

/* Opcional: flecha personalizada (solo estética) */
.form-group select {
  appearance: none;
  /* quita el estilo nativo */
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><polygon points='0,0 12,0 6,6' fill='%23666'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

/* Leyenda pequeña encima del select */
.form-group .form-legend {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 4px;
  display: block;
}



/* Botones */
.Form_contrato_button {
  background-color: #007bff;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 25px;
  font-weight: bold;
  transition: background 0.2s;
}

.Form_contrato_button:hover {
  background-color: #0056b3;
}

/* Opciones horizontales con checkbox/radio grandes */
.Form_contrato_options {
  display: flex;
  gap: 3px;
  /* espacio pequeñito entre opciones */
  margin-top: 15px;
  flex-wrap: wrap;
  /* para que no explote en pantallas chicas */
}

/* Ocultamos los radios */
.Form_contrato_options input[type="radio"] {
  display: none;
}


.Form_contrato_options label {
  cursor: pointer;
}

.Form_contrato_options label span {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f9f9f9;
  transition: all 0.2s ease;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.Form_contrato_options label span:hover {
  background: #eef5ff;
  border-color: #007bff;
}

/* Cuando está seleccionado */
.Form_contrato_options input[type="radio"]:checked+span {
  background: #0056b3;
  color: white;
  border-color: #007bff;
  font-weight: bold;
}

.Form_contrato_steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  position: relative;
}

.Form_contrato_steps .step {
  text-align: center;
  flex: 1;
  position: relative;
}

/* Línea gris entre pasos (siempre igual) */
.Form_contrato_steps .step::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 3px;
  background-color: #ddd;
  z-index: -1;
}

.Form_contrato_steps .step:last-child::after {
  display: none;
}

/* Círculo base */
.circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ddd;
  margin: 0 auto;
  line-height: 32px;
  font-weight: bold;
  color: #fff;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Paso activo (azul con número) */
.step.active .circle {
  background-color: #007bff;
  transform: scale(1.1);
}

/* Paso completado (verde con check) */
.step.completed .circle {
  background-color: #28a745;
  font-size: 18px;
}

/* Texto debajo */
.label {
  margin-top: 5px;
  font-size: 12px;
  color: #333;
}

.date-choice {
  display: flex;
  gap: 15px;
  margin: 10px 0;
}

.date-option {
  flex: 1;
  padding: 15px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.date-option:hover {
  border-color: #007bff;
  background: #f0f8ff;
}

.date-option.active {
  border-color: #007bff;
  background: #0056b3;
  color: #fff;
  font-weight: bold;
}

.gut-choice {
  display: flex;
  gap: 15px;
  margin: 10px 0;
}

.gut-option {
  flex: 1;
  padding: 15px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  background: #f9f9f9;
}

.gut-option:hover {
  border-color: #007bff;
  background: #f0f8ff;
}

.gut-option.active {
  border-color: #007bff;
  background: #0056b3;
  color: #fff;
  font-weight: bold;
}



/* Checkbox / radio grandes */
.Form_contrato_options input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-right: 10px;
  cursor: pointer;
}

.Form_contrato_table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.Form_contrato_table td {
  padding: 10px;
  vertical-align: middle;
  border-bottom: 1px solid #ddd;
}

.Form_contrato_table td:first-child {
  text-align: left;
  font-weight: normal;
}

.Form_contrato_table input[type="checkbox"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.Form_contrato_table input[type="text"] {
  margin-left: 10px;
  padding: 5px;
  font-size: 0.9rem;
}

/* Contenedor principal del resumen */


/* Título del resumen */
#auto_section h3 {
  margin-bottom: 15px;
  font-size: 20px;
  color: #222;
  border-bottom: 2px solid #007BFF;
  display: inline-block;
  padding-bottom: 5px;
}

/* Caja que contiene los datos */
/* Contenedor interno de resumen */
.summary-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

/* Cada línea como tarjeta interna */
.summary-box p {
  margin: 0;
  padding: 12px 16px;
  background: #f5f7ff;
  /* fondo suave */
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}

/* Animación al pasar el mouse */
.summary-box p:hover {
  background: #e6ecff;
  transform: translateY(-2px);
}

/* Etiquetas en negrita y color */
.summary-box p strong {
  font-weight: 600;
  color: #007BFF;
  min-width: 140px;
  /* para alinear columnas */
}

/* Objekttyp en mayúsculas */
#summary_objekttyp {
  text-transform: uppercase;
}

/* Iconos como PNG solo para las otras líneas */
.summary-box p span {
  font-weight: 500;
  color: #222;
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 0;
  transform: translateY(5px);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Cuando JS rellena el valor, agregar clase .visible */
.summary-box p span.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Iconos PNG usando background-image */
#summary_wohnflaeche::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url('/assets/images/grundriss.png');
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

#summary_zimmer::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url('/assets/images/wohnung.png');
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

#summary_keller::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url('/assets/images/keller.png');
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}



/* Afecta solo esta sección */
.moeblierung-options {
  display: flex;
  justify-content: center;
  gap: 45px;
  margin: 15px 0;
}

.moeblierung-options .moeblierung-option {
  display: flex;
  flex-direction: column;
  /* imagen arriba, texto debajo */
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;

  /* reset de estilos heredados tipo botón */
  all: unset;
  /* quita todo estilo heredado */
  display: flex;
  /* restauramos el display necesario */
  flex-direction: column;
  align-items: center;
}

.moeblierung-options .moeblierung-option input {
  display: none;
  /* escondemos el radio clásico */
}

.moeblierung-options .img-container {
  position: relative;
  display: inline-block;
}

.moeblierung-options img {
  width: 130px;
  height: 120px;
  border: 1px solid transparent;
  border-radius: 6px;
  object-fit: cover;
  transition: transform 0.3s ease, border 0.3s ease;
}

/* Zoom al pasar el mouse */
.moeblierung-options .moeblierung-option:hover img {
  transform: scale(2.3);
  z-index: 10;
  position: relative;
}

/* Borde y sombra cuando está seleccionado */
.moeblierung-options .moeblierung-option input:checked+.img-container img {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

/* Texto debajo */
.moeblierung-options .moeblierung-option span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

/* Texto subrayado y azul cuando se selecciona */
.moeblierung-options .moeblierung-option input:checked+.img-container+span {
  text-decoration: underline;
  font-weight: bold;
  color: #007bff;
}

.room-section {
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
  margin-top: 15px;
}

.room-section.visible {
  display: block;
  opacity: 1;
  max-height: 1000px;
  /* suficiente para cualquier formulario */
}

/* ==== Contenedor general de cada categoría ==== */
.item-wrapper {
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 22px;
  background: #fcfcfc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.item-wrapper:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* ==== Título del ítem ==== */
.item-wrapper h5 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2c3e50;
  flex: 1;
}

/* ==== Cabecera con título y botones ==== */
.item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

/* ==== Tabla de selección ==== */
.Form_contrato_table {
  width: 100%;
  border-collapse: collapse;
}

.Form_contrato_table td {
  padding: 6px 8px;
  vertical-align: middle;
  font-size: 0.95rem;
}

/* ==== Campos compactos ==== */
.Form_contrato_table select,
.Form_contrato_table input[type="number"] {
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  padding: 6px 8px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.Form_contrato_table input[type="number"] {
  width: 80px;
  text-align: center;
}

.Form_contrato_table select:focus,
.Form_contrato_table input[type="number"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(38, 138, 239, 0.2);
  outline: none;
}

/* ==== Botones + y - ==== */
/* Contenedor del título y botón */
/* Botón tipo texto para agregar */
.add-item-btn {
  display: inline-block;
  background: none;
  border: none;
  color: #0d6efd;
  /* color azul tipo link */
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0;
  margin-left: 10px;
  /* separación respecto al título */
  cursor: pointer;
  text-decoration: underline;
  /* opcional, estilo link */
  transition: color 0.2s ease, transform 0.2s ease;
}

.add-item-btn:hover {
  color: #0056b3;
  transform: scale(1.05);
}

/* Mantener el botón de eliminar igual */
.remove-item-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 28px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background-color: #ff5f5f;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.remove-item-btn:hover {
  background-color: #e74c3c;
  transform: scale(1.1);
}

.sub-item-row {
  display: none;
  /* por defecto oculto */
  margin-bottom: 6px;
  align-items: center;
  gap: 8px;
}

.sub-item-row.visible {
  display: flex;
  /* se muestra cuando se activa */
}

.sub-item-label {
  flex-shrink: 0;
  font-weight: 500;
  width: 150px;
}

/* ---------- BLOQUE AISLADO: Category Selector ---------- */
.category-selector-isolated {
  all: initial;

  /* 🔒 borra todo estilo heredado */
  * {
    all: unset;
  }

  font-family: "Inter",
  "Segoe UI",
  Roboto,
  sans-serif;
  display: block;
  padding: 1.5rem;
  box-sizing: border-box;
  background-color: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
}

/* Encabezado */
.category-selector-isolated h3 {
  all: unset;
  display: block;
  font-weight: 600;
  font-size: 1.2rem;
  color: #222;
  margin-bottom: 1.25rem;
}

/* Contenedor flexible de botones */
.category-selector-isolated .category-toggle-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Botón individual */
.category-selector-isolated .category-toggle {
  position: relative;
  display: inline-block;
}

.category-selector-isolated .category-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-selector-isolated .category-toggle span {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.4rem;
  /* ← menos redondeado, más elegante */
  border: 1px solid #ccc;
  background-color: #f8f9fa;
  color: #333;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  transition: all 0.25s ease;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Hover */
.category-selector-isolated .category-toggle span:hover {
  background-color: #eef1f4;
  border-color: #007bff;
  transform: translateY(-1px);
}

/* Activo (checked) */
.category-selector-isolated .category-toggle input[type="checkbox"]:checked+span {
  background-color: #0056b3;
  border-color: #007bff;
  color: white;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.18);
}

/* Contenedor principal ajustado al ancho de la segunda columna */
.elegant-info {
  max-width: 250px;       /* coincide con la segunda columna */
  margin: 0 auto 1.5rem;  /* centrado y separacion del formulario */
  width: 100%;
  box-sizing: border-box;
}

/* Forzar que nunca supere la columna secundaria */
@media (min-width: 768px) {
  .Form_contrato_section .elegant-info {
    max-width: 400px;
    /* ancho aproximado de segunda columna */
  }
}

.elegant-info h4 {
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  text-align: left;
}

.elegant-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.elegant-info li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #334155;
  font-size: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.7rem;
  transition: all 0.2s ease-in-out;
}

.elegant-info li:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.elegant-info .info-icon {
  width: 25px;          /* tamaño uniforme */
  height: 25px;
  object-fit: contain;  /* mantiene proporción */
  margin-right: 0.60rem;
  flex-shrink: 0;
}






/* Clic */
.category-selector-isolated .category-toggle span:active {
  transform: scale(0.98);
}

/* Responsivo */
@media (max-width: 600px) {
  .category-selector-isolated .category-toggle-container {
    flex-direction: column;
    align-items: stretch;
  }

  .category-selector-isolated .category-toggle span {
    text-align: center;
    width: 100%;
  }
}