/**
 * Calendario de disponibilidad Camino Inca — Terra Quechua
 * Encapsulado en .tic · azul de marca + naranja de acción · Poppins / Montserrat
 */
.tic {
    --tic-blue: #2e47ab;
    --tic-blue-d: #1f3284;
    --tic-navy: #0b1f33;
    --tic-ink: #1e293b;
    --tic-muted: #64748b;
    --tic-line: #e3e8f2;
    --tic-soft: #f5f7fc;
    --tic-accent: #f7931e;
    --tic-accent-d: #e07b06;
    --tic-ok: #15803d;
    --tic-ok-bg: #effaf2;
    --tic-few: #c26a05;
    --tic-few-bg: #fff6e6;
    --tic-sold: #b42318;
    --tic-sold-bg: #fdf2f1;
    --tic-closed: #94a3b8;
    --tic-closed-bg: #f1f4f8;
    --tic-ask: #2e47ab;
    --tic-ask-bg: #f0f3ff;
    --tic-wa: #1faa55;

    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--tic-ink);
    margin: 24px 0 32px;
    width: 100%;
    text-align: left;
    line-height: 1.35;
}
.tic *, .tic *::before, .tic *::after { box-sizing: border-box; }
.tic button { font-family: inherit; cursor: pointer; margin: 0; }
.tic svg { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* ---------- Pestañas de ruta (4 días / 2 días) ---------- */
.tic-routes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px;
    margin-bottom: 16px;
    background: var(--tic-soft);
    border: 1px solid var(--tic-line);
    border-radius: 999px;
}
.tic-route {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--tic-navy);
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.tic-route:hover { background: #fff; }
.tic-route__name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 16px; }
.tic-route__sub { font-size: 12px; color: var(--tic-muted); font-weight: 500; }
.tic-route.is-active {
    background: linear-gradient(135deg, var(--tic-blue) 0%, var(--tic-navy) 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(46, 71, 171, .28);
}
.tic-route.is-active .tic-route__sub { color: #ffd27f; }

/* ---------- Tarjeta ---------- */
.tic-card {
    background: #fff;
    border: 1px solid var(--tic-line);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 18px 44px rgba(11, 31, 51, .08);
}

.tic-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.tic-nav { display: flex; align-items: center; gap: 12px; }
.tic-arrow {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--tic-line);
    background: #fff;
    color: var(--tic-blue);
    font-size: 22px;
    transition: all .15s ease;
}
.tic-arrow:hover:not(:disabled) { background: var(--tic-blue); color: #fff; border-color: var(--tic-blue); }
.tic-arrow:disabled { opacity: .35; cursor: not-allowed; }
.tic-month { display: flex; flex-direction: column; min-width: 190px; }
.tic-month__name { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px; color: var(--tic-navy); line-height: 1.15; }
.tic-month__count { font-size: 12.5px; color: var(--tic-muted); font-weight: 500; }

.tic-source {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--tic-soft);
    font-size: 12px; font-weight: 600; color: var(--tic-muted);
}
.tic-source:empty, .tic-source .tic-source__txt:empty { display: none; }
.tic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tic-closed); flex: none; }
.tic-source.is-live { background: var(--tic-ok-bg); color: var(--tic-ok); }
.tic-source.is-live .tic-dot { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: tic-pulse 2s infinite; }
.tic-source.is-stale { background: var(--tic-few-bg); color: var(--tic-few); }
.tic-source.is-stale .tic-dot { background: var(--tic-accent); }
.tic-source.is-team { background: var(--tic-ask-bg); color: var(--tic-blue); }
.tic-source.is-team .tic-dot { background: var(--tic-blue); }
@keyframes tic-pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

/* ---------- Tira de meses ---------- */
.tic-strip {
    position: relative;             /* offsetLeft de los chips relativo a la tira */
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    margin-bottom: 8px;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.tic-strip::-webkit-scrollbar { display: none; }
.tic-chip {
    flex: 0 0 auto;
    display: flex; flex-direction: column; align-items: center;
    min-width: 66px;
    padding: 7px 10px;
    border: 1px solid var(--tic-line);
    border-radius: 12px;
    background: #fff;
    color: var(--tic-navy);
    line-height: 1.1;
    transition: all .15s ease;
}
.tic-chip b { font-size: 13.5px; font-weight: 700; }
.tic-chip small { font-size: 11px; color: var(--tic-muted); }
.tic-chip:hover { border-color: var(--tic-blue); }
.tic-chip.is-active { background: var(--tic-blue); border-color: var(--tic-blue); color: #fff; box-shadow: 0 6px 14px rgba(46, 71, 171, .25); }
.tic-chip.is-active small { color: #ffd27f; }

/* ---------- Rejilla ---------- */
.tic-week, .tic-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tic-week {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--tic-blue);
}
.tic-week span {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 12.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .6px;
    color: var(--tic-navy);
}

.tic-day {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    min-height: 104px;
    padding: 8px 8px 10px;
    border: 1px solid var(--tic-line);
    border-radius: 14px;
    background: #fff;
    color: var(--tic-ink);
    text-align: center;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tic-day::before {             /* franja de estado */
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    background: transparent;
}
button.tic-day:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(11, 31, 51, .10); }
button.tic-day:focus-visible { outline: 3px solid rgba(46, 71, 171, .45); outline-offset: 2px; }
.tic-day.is-selected { border-color: var(--tic-blue); box-shadow: 0 0 0 2px var(--tic-blue), 0 12px 24px rgba(46, 71, 171, .18); }

.tic-day__top { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 6px; }
.tic-day__num { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 14px; color: var(--tic-navy); }
.tic-day__ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 8px;
    font-size: 15px; color: #fff;
}
.tic-day__val { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px; line-height: 1.05; }
.tic-day__glyph { display: inline-flex; font-size: 22px; margin-top: 2px; }
.tic-day__lbl { margin-top: 3px; font-size: 11.5px; font-weight: 600; color: var(--tic-muted); }
.tic-day__bar { width: 100%; height: 5px; margin-top: auto; border-radius: 999px; background: rgba(15, 23, 42, .08); overflow: hidden; }
.tic-day__bar i { display: block; height: 100%; border-radius: inherit; background: currentColor; }

.tic-day.is-today .tic-day__num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--tic-accent); color: #fff;
}

/* Estados */
.tic-day.is-available { background: var(--tic-ok-bg); border-color: #cfead8; color: var(--tic-ok); }
.tic-day.is-available::before { background: var(--tic-ok); }
.tic-day.is-available .tic-day__ico { background: var(--tic-accent); }
.tic-day.is-available .tic-day__lbl { color: var(--tic-ok); }

.tic-day.is-few { background: var(--tic-few-bg); border-color: #f6dcae; color: var(--tic-few); }
.tic-day.is-few::before { background: var(--tic-accent); }
.tic-day.is-few .tic-day__ico { background: var(--tic-accent); }
.tic-day.is-few .tic-day__lbl { color: var(--tic-few); }

.tic-day.is-soldout { background: var(--tic-sold-bg); border-color: #f4d3cf; color: var(--tic-sold); }
.tic-day.is-soldout::before { background: var(--tic-sold); }
.tic-day.is-soldout .tic-day__ico { background: transparent; color: var(--tic-sold); }
.tic-day.is-soldout .tic-day__lbl { color: var(--tic-sold); }

.tic-day.is-closed { background: var(--tic-closed-bg); color: var(--tic-closed); }
.tic-day.is-closed .tic-day__num { color: var(--tic-closed); }

.tic-day.is-consult, .tic-day.is-short { background: var(--tic-ask-bg); border-color: #dbe2fb; color: var(--tic-wa); }
.tic-day.is-consult::before, .tic-day.is-short::before { background: var(--tic-blue); }
.tic-day.is-consult .tic-day__lbl, .tic-day.is-short .tic-day__lbl { color: var(--tic-blue); }

.tic-day.is-past { background: transparent; border-style: dashed; opacity: .45; min-height: 104px; }
.tic-day.is-past .tic-day__num { font-weight: 500; color: var(--tic-muted); }
.tic-day.is-blank { border: 0; background: transparent; min-height: 0; }
.tic-day.is-skel {
    background: linear-gradient(90deg, #f1f4f9 25%, #e8edf5 37%, #f1f4f9 63%);
    background-size: 400% 100%;
    animation: tic-shimmer 1.2s ease infinite;
    border-color: transparent;
}
.tic-day.is-skel .tic-day__num { color: #b6c0d0; }
@keyframes tic-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Panel de fecha elegida ---------- */
.tic-panel {
    display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7f9ff 0%, #eef2ff 100%);
    border: 1px solid #dbe2fb;
    border-left: 5px solid var(--tic-accent);
    animation: tic-in .2s ease;
}
.tic-panel[hidden] { display: none; }
@keyframes tic-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tic-panel__info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tic-panel__kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--tic-blue); }
.tic-panel__date { font-family: 'Poppins', sans-serif; font-size: 19px; font-weight: 700; color: var(--tic-navy); }
.tic-panel__note { margin: 2px 0 0; font-size: 13px; color: var(--tic-muted); }
.tic-panel__cta { display: flex; gap: 10px; flex-wrap: wrap; }

.tic-pill { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tic-pill.is-available { background: #d9f2e1; color: var(--tic-ok); }
.tic-pill.is-few { background: #ffe8c2; color: var(--tic-few); }
.tic-pill.is-soldout { background: #fbdcd8; color: var(--tic-sold); }
.tic-pill.is-closed { background: #e2e8f0; color: #475569; }
.tic-pill.is-consult, .tic-pill.is-short { background: #dde4ff; color: var(--tic-blue); }

.tic-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700; font-size: 14.5px;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.tic-btn svg { font-size: 18px; }
.tic-btn--book { background: var(--tic-accent); color: #fff !important; box-shadow: 0 8px 18px rgba(247, 147, 30, .35); }
.tic-btn--book:hover { background: var(--tic-accent-d); transform: translateY(-1px); }
.tic-btn--wa { background: #fff; color: var(--tic-wa) !important; border: 2px solid var(--tic-wa); }
.tic-btn--wa:hover { background: var(--tic-wa); color: #fff !important; }

/* ---------- Leyenda y nota ---------- */
.tic-legend {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
    list-style: none !important;
    margin: 20px 0 0 !important; padding: 16px 0 0 !important;
    border-top: 1px solid var(--tic-line);
}
.tic-legend li { display: inline-flex; align-items: center; gap: 7px; margin: 0 !important; font-size: 12.5px; font-weight: 600; color: var(--tic-muted); }
.tic-legend li::before, .tic-legend li::marker { content: none; }
.tic-sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 2px solid; }
.tic-sw--available { background: var(--tic-ok-bg); border-color: var(--tic-ok); }
.tic-sw--few { background: var(--tic-few-bg); border-color: var(--tic-accent); }
.tic-sw--soldout { background: var(--tic-sold-bg); border-color: var(--tic-sold); }
.tic-sw--consult { background: var(--tic-ask-bg); border-color: var(--tic-blue); }
.tic-sw--closed { background: var(--tic-closed-bg); border-color: var(--tic-closed); }
.tic-note { margin: 12px 0 0 !important; text-align: center; font-size: 12px; color: var(--tic-muted); }

.tic-error { grid-column: 1 / -1; padding: 34px 16px; text-align: center; }
.tic-error p { margin: 0 0 14px; color: var(--tic-muted); }
.tic-retry { padding: 11px 18px; border-radius: 12px; border: 1px solid var(--tic-line); background: #fff; color: var(--tic-blue); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .tic-day { min-height: 92px; }
    .tic-day__val { font-size: 19px; }
}
@media (max-width: 640px) {
    .tic-routes { border-radius: 16px; }
    .tic-route { border-radius: 12px; padding: 10px 6px; }
    .tic-route__name { font-size: 14px; }
    .tic-route__sub { font-size: 11px; }
    .tic-card { padding: 14px 10px; border-radius: 16px; }
    .tic-top { margin-bottom: 10px; }
    .tic-nav { width: 100%; justify-content: space-between; }
    .tic-month { min-width: 0; align-items: center; text-align: center; }
    .tic-month__name { font-size: 18px; }
    .tic-arrow { width: 38px; height: 38px; }
    .tic-source { width: 100%; justify-content: center; }
    .tic-week, .tic-days { gap: 4px; }
    .tic-week span { font-size: 10.5px; letter-spacing: 0; }
    .tic-day, .tic-day.is-past { min-height: 58px; padding: 6px 2px 5px; border-radius: 10px; }
    .tic-day::before { height: 3px; }
    .tic-day__top { justify-content: center; margin-bottom: 2px; }
    .tic-day__num { font-size: 11px; }
    .tic-day.is-today .tic-day__num { width: 20px; height: 20px; }
    .tic-day__ico, .tic-day__lbl, .tic-day__bar { display: none; }
    .tic-day__val { font-size: 14px; }
    .tic-day__glyph { font-size: 16px; }
    .tic-panel { padding: 14px; }
    .tic-panel__cta, .tic-btn { width: 100%; }
    .tic-legend { gap: 6px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .tic *, .tic *::before { animation: none !important; transition: none !important; }
}
