/* Cobertura Extendida - Estilos propios (ce-*) */

.ce-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
}

.ce-form {
  display: block;
}

#ce-form[hidden] {
  display: none !important;
}

.ce-step {
  display: none;
}

.ce-step.ce-step-active {
  display: block;
}

.ce-step-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.ce-step-desc {
  margin: 0 0 1.25rem;
  color: #555;
  font-size: 0.95rem;
}

.ce-field {
  margin-bottom: 1rem;
}

.ce-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.ce-required {
  color: #c00;
}

.ce-input {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.ce-input:focus {
  outline: none;
  border-color: #666;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.ce-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #c00;
}

.ce-actions {
  margin-top: 1.25rem;
}

.ce-actions-end {
  margin-top: 1.5rem;
}

.ce-btn {
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  background: #f5f5f5;
  color: #333;
}

.ce-btn-primary {
  background: #c00;
  border-color: #a00;
  color: #fff;
}

.ce-btn-primary:hover {
  background: #a00;
}

.ce-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.ce-loading {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #666;
}

.ce-loading[hidden] {
  display: none !important;
}

/* Bloque de sección */
.ce-block {
  margin-bottom: 1.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.ce-block:last-of-type {
  border-bottom: none;
}

.ce-block-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.ce-block-desc {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #555;
}

.ce-grid {
  display: grid;
  gap: 1rem;
}

.ce-grid-2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 520px) {
  .ce-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Radios */
.ce-radio-group,
.ce-coverage-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.ce-radio-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

.ce-radio {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
}

.ce-radio-label {
  user-select: none;
}

/* Checkbox */
.ce-block-checkbox {
  border-bottom: none;
}

.ce-checkbox-wrap {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

.ce-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  cursor: pointer;
}

.ce-checkbox-label {
  user-select: none;
}

/* Tarjetas de crédito */
.ce-creditos-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.ce-credit-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  background: #fafafa;
}

.ce-credit-card-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #333;
}

.ce-credit-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.ce-credit-meta dt {
  margin: 0;
  font-weight: 600;
  color: #555;
}

.ce-credit-meta dd {
  margin: 0;
}

.ce-credit-fields {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ce-credit-field {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 0.5rem;
}

.ce-credit-field .ce-label {
  margin: 0;
  font-size: 0.85rem;
}

.ce-credit-field .ce-input {
  max-width: none;
}

.ce-credit-fields-readonly .ce-value {
  font-weight: 500;
}

.ce-badge-nivel {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

.ce-badge-nivel.ce-nivel-red {
  background: linear-gradient(135deg, #e4121c 0%, #ff3d47 100%);
  color: #ffffff;
}

.ce-badge-nivel.ce-nivel-gold {
  background: linear-gradient(135deg, #e89b0a 0%, #f8ab31 50%, #fcd88a 100%);
  color: #000000;
}

.ce-badge-nivel.ce-nivel-black {
  background: linear-gradient(135deg, #191918 0%, #2d2d2c 100%);
  color: #ffffff;
}

input.ce-input[readonly] {
  background: #f5f5f5;
  cursor: default;
}

/* Tabla de cobertura por crédito */
.ce-coverage-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.ce-coverage-table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ce-coverage-table th,
.ce-coverage-table td {
  padding: 0.4rem 0.5rem;
  border: 1px solid #ddd;
  text-align: left;
}

.ce-coverage-table th {
  background: #eee;
  font-weight: 600;
}

.ce-coverage-table td {
  background: #fff;
}

.ce-coverage-table .ce-no-aplica {
  color: #999;
  font-style: italic;
}

/* Celdas de nivel de cobertura (TIPO) con degradado sutil */
.ce-coverage-table .ce-tipo-red {
  background: linear-gradient(135deg, #e4121c 0%, #ff3d47 100%);
  color: #ffffff;
  font-weight: 600;
}

.ce-coverage-table .ce-tipo-gold {
  background: -webkit-linear-gradient(top, #d0962a, #FDE08D, #DF9F28);
  background: linear-gradient(to bottom, #d0962a, #FDE08D, #DF9F28);
  color: #000000;
  font-weight: 600;
}

.ce-coverage-table .ce-tipo-black {
  background: linear-gradient(135deg, #191918 0%, #2d2d2c 100%);
  color: #ffffff;
  font-weight: 600;
}

.ce-tipo-moto {
  margin-top: 0.75rem;
}

.ce-tipo-moto .ce-label {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.ce-tipo-moto .ce-radio-group {
  margin-top: 0.25rem;
}

/* Nota final */
.ce-note {
  margin-top: 2rem;
  padding: 1rem;
  font-size: 0.9rem;
  color: #555;
  border-top: 1px solid #eee;
}

.ce-note strong {
  color: #333;
}

/* Mensaje de éxito tras enviar */
.ce-success-message {
  padding: 2rem 1.5rem;
  text-align: center;
  background: #f0f9f0;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  margin-top: 1rem;
}

.ce-success-message[hidden] {
  display: none !important;
}

.ce-success-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #2e7d32;
}

.ce-success-text {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: #555;
}

.ce-success-message .ce-success-btn {
  margin-top: 0.25rem;
}

