/* =========================
   BASE
========================= */
.cec-checkout-page {
  background: var(--cec-bg);
  padding: 30px 20px;
  min-height: 100vh;
}

.cec-checkout-shell {
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */
.cec-checkout-header {
  margin-bottom: 20px;
}

.cec-checkout-header h1 {
  margin: 5px 0;
  font-size: 26px;
  color: var(--cec-text);
}

.cec-checkout-header p {
  color: var(--cec-muted);
  font-size: 14px;
}

.cec-checkout-back {
  text-decoration: none;
  color: var(--cec-primary);
  font-weight: 600;
}

/* =========================
   LAYOUT
========================= */
.cec-checkout-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.cec-checkout-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cec-checkout-side {
  position: relative;
}

/* =========================
   CARDS
========================= */
.cec-card {
  background: var(--cec-card);
  border-radius: var(--cec-radius);
  box-shadow: var(--cec-shadow);
  padding: 20px;
}

/* =========================
   TYPE SWITCH
========================= */
.cec-type-card {
  padding-bottom: 10px;
}

.cec-type-switch {
  display: flex;
  gap: 10px;
}

.cec-type-switch button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--cec-border);
  background: white;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 600;
}

.cec-type-switch button.active {
  background: var(--cec-primary);
  color: white;
  border-color: var(--cec-primary);
}

.cec-type-help {
  margin-top: 10px;
  font-size: 13px;
  color: var(--cec-muted);
}

/* =========================
   FORM
========================= */
.cec-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cec-form-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* =========================
   SECTION HEADER
========================= */
.cec-section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cec-section-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cec-primary);
  color: white;
  font-weight: bold;
  text-align: center;
  line-height: 32px;
}

.cec-section-head h2 {
  margin: 0;
  font-size: 18px;
}

.cec-section-head p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--cec-muted);
}

/* =========================
   GRID
========================= */
.cec-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cec-grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cec-field-full {
  grid-column: span 2;
}

/* =========================
   INPUTS
========================= */
.cec-field {
  display: flex;
  flex-direction: column;
}

.cec-field label {
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--cec-muted);
}

.cec-field label span {
  color: var(--cec-error);
}

.cec-input {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--cec-border);
  font-size: 14px;
  transition: all 0.2s;
}

.cec-input:focus {
  border-color: var(--cec-primary);
  box-shadow: 0 0 0 2px rgba(36,48,108,0.1);
  outline: none;
}

.cec-input-error {
  border-color: var(--cec-error);
}

.cec-input-warning {
  border-color: var(--cec-warning);
}

/* =========================
   CHECKBOX
========================= */
.cec-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

/* =========================
   PARTICIPANTES
========================= */
.cec-participants {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cec-participant-card {
  border: 1px solid var(--cec-border);
  border-radius: 10px;
  padding: 14px;
  background: #fafbff;
}

.cec-btn-add {
  margin-top: 10px;
}

/* =========================
   RESUMEN
========================= */
.cec-summary-card {
  position: sticky;
  top: 20px;
}

.cec-summary-head h2 {
  margin: 0;
}

.cec-summary-head p {
  font-size: 13px;
  color: var(--cec-muted);
  margin-top: 4px;
}

.cec-summary-items {
  margin: 15px 0;
}

.cec-summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}

.cec-summary-divider {
  height: 1px;
  background: var(--cec-border);
  margin: 10px 0;
}

.cec-summary-line {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.cec-summary-line.total {
  font-size: 16px;
  font-weight: bold;
  margin-top: 12px;
}

.cec-summary-note {
  font-size: 13px;
  color: var(--cec-muted);
  margin-top: 10px;
}

/* =========================
   BOTONES
========================= */
.cec-btn-primary {
  width: 100%;
  margin-top: 15px;
  background: var(--cec-primary);
  color: white;
  padding: 14px;
  border-radius: var(--cec-radius);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.cec-btn-primary:hover {
  background: var(--cec-primary-light);
}

.cec-btn-outline {
  border: 1px solid var(--cec-border);
  padding: 10px;
  border-radius: var(--cec-radius);
  background: white;
  cursor: pointer;
}

/* =========================
   ALERTS
========================= */
.cec-alert {
  padding: 12px;
  border-radius: var(--cec-radius);
  margin-bottom: 15px;
}

.cec-alert.error {
  background: #fde2e1;
  color: var(--cec-error);
}

.cec-alert.warning {
  background: #fff4e5;
  color: var(--cec-warning);
}

.cec-hidden {
  display: none;
}

/* =========================
   SAVE NOTE
========================= */
.cec-save-note {
  font-size: 12px;
  text-align: center;
  margin-top: 10px;
  color: var(--cec-muted);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {

  .cec-checkout-layout {
    grid-template-columns: 1fr;
  }

  .cec-summary-card {
    position: static;
  }

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

  .cec-field-full {
    grid-column: span 1;
  }

}