/* Barco Hotel · Reserva directa en 3 pasos (js/checkout.js). Usa los tokens de css/styles.css. */
.co { width: min(720px, calc(100vw - 32px)); max-height: min(92dvh, 900px); padding: 0; border: 0; border-radius: 24px; background: var(--bg); color: var(--ink); box-shadow: 0 40px 120px rgba(6, 18, 38, .45); overflow: hidden; }
.co[open] { display: flex; animation: coIn .35s var(--ease); }
.co::backdrop { background: rgba(6, 18, 38, .62); }
.co [hidden] { display: none !important; }
@keyframes coIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

.co-form { display: flex; flex-direction: column; width: 100%; max-height: inherit; }
.co-head { position: relative; background: var(--navy-deep); color: #fff; padding: 22px 28px 18px; }
.co-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.co-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin-top: 4px; outline: none; }
.co-head h2 em { color: var(--gold); }
.co-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.co-close:hover { border-color: var(--gold); }
.co-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 8px; }
.co-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .55); padding-top: 10px; border-top: 3px solid rgba(255, 255, 255, .15); transition: color .3s, border-color .3s; }
.co-steps li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .12); font-size: 12px; }
.co-steps li.is-on { color: #fff; border-color: var(--gold); }
.co-steps li.is-on span, .co-steps li.is-done span { background: var(--gold); color: var(--navy-deep); }
.co-steps li.is-done { color: rgba(255, 255, 255, .85); border-color: rgba(212, 168, 83, .6); }

.co-body { flex: 1; overflow-y: auto; padding: 24px 28px; overscroll-behavior: contain; }
.co-step { display: flex; flex-direction: column; gap: 20px; animation: coStep .3s var(--ease); }
@keyframes coStep { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.co-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.co-seg label { position: relative; cursor: pointer; }
.co-seg input { position: absolute; opacity: 0; }
.co-seg span { display: block; text-align: center; padding: 11px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); transition: background-color .2s, color .2s; }
.co-seg input:checked + span { background: var(--navy-deep); color: #fff; }
.co-seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.co-field { border: 0; margin: 0; padding: 0; }
.co-field legend, .co-input > span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.co-input > span small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.co-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.co-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.co-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.co-card:hover { border-color: #D7C9AE; transform: translateY(-1px); }
.co-card input { position: absolute; opacity: 0; }
.co-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.co-card strong { display: block; font-size: 15px; }
.co-card small { display: block; font-size: 12.5px; color: var(--muted); }
.co-card:has(input:checked) { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(193, 42, 58, .12); }
.co-card:has(input:checked)::after { content: "✓"; position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--crimson); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.co-card:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.co-card-rate { padding: 14px 16px; }

.co-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.co-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.co-full { grid-column: 1 / -1; }
.co-input input { width: 100%; min-height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: 600 16px var(--sans); color: var(--ink); }
.co-input input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(24, 75, 143, .15); }
.co-stepper { display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; min-height: 50px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.co-stepper button { height: 100%; border: 0; background: transparent; font-size: 22px; color: var(--navy-deep); cursor: pointer; }
.co-stepper button:hover:not(:disabled) { background: var(--bg); }
.co-stepper button:disabled { color: #C8C2B6; cursor: not-allowed; }
.co-stepper output { text-align: center; font-weight: 700; font-size: 17px; }
.co-hint { font-size: 13.5px; color: var(--muted); }

.co-extras { display: grid; gap: 10px; }
.co-extra { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color .2s; }
.co-extra input { width: 22px; height: 22px; accent-color: var(--crimson); }
.co-extra strong { display: block; font-size: 15px; }
.co-extra small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.co-extra-price { font-weight: 700; color: var(--crimson); white-space: nowrap; }
.co-extra:has(input:checked) { border-color: var(--crimson); }

.co-summary { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.co-sum-title { font-family: var(--serif); font-size: 24px; }
.co-sum-dates { color: var(--muted); font-size: 14px; margin-top: 4px; }
.co-lines { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.co-lines li { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; color: var(--ink-2); }
.co-lines .co-adelanto { color: var(--crimson); font-weight: 700; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 700; }
.co-total strong { font-family: var(--serif); font-weight: 400; font-size: 34px; color: var(--ink); }
.co-pay-info { display: grid; gap: 6px; padding: 16px 18px; border-radius: 14px; background: rgba(61, 134, 198, .08); border: 1px solid rgba(61, 134, 198, .25); font-size: 14.5px; }
.co-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.co-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--crimson); flex-shrink: 0; }
.co-check a { color: var(--navy); font-weight: 700; }

.co-foot { border-top: 1px solid var(--line); background: #fff; padding: 14px 28px calc(14px + env(safe-area-inset-bottom)); }
.co-error { margin-bottom: 10px; padding: 10px 14px; border-radius: 10px; background: #FBE9EC; color: var(--crimson-dark); font-weight: 600; font-size: 14px; }
.co-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.co-foot-total span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.co-foot-total strong { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.co-actions { display: flex; gap: 10px; }
.co-actions .btn-lg { min-width: 190px; }
.co-actions .btn.is-loading { opacity: .8; cursor: progress; }

@media (max-width: 640px) {
  .co { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .co-head { padding: 16px 18px 14px; }
  .co-head h2 { font-size: 24px; }
  .co-close { top: 10px; right: 10px; }
  .co-steps li { font-size: 12px; gap: 6px; }
  .co-body { padding: 18px; }
  .co-cards { grid-template-columns: minmax(0, 1fr); }
  .co-card { flex-direction: row; align-items: center; gap: 12px; }
  .co-card img { width: 84px; flex: 0 0 84px; aspect-ratio: 4 / 3; }
  .co-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-card-rate { flex-direction: column; align-items: flex-start; }
  .co-grid, .co-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .co-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .co-foot-total strong { font-size: 26px; }
  .co-actions .btn-lg { min-width: 0; padding-inline: 22px; }
}
@media (prefers-reduced-motion: reduce) { .co[open], .co-step { animation: none; } }

/* Tipo de habitación agotado en las fechas elegidas */
.co-full { display: none; font-style: normal; font-size: 12px; font-weight: 600; color: #A61F30; }
.co-card.is-full .co-full { display: block; }
.co-card.is-full img { filter: grayscale(1); opacity: .6; }

/* Reserva recibida sin conexión con el hotel */
.co-pendiente { padding: 24px 4px; gap: 12px; }
.co-pendiente h3 { font-size: 26px; }
.co-pendiente p { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
