.tt-booking-portal {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px;
    border: 1px solid #d9dee6;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 60px rgba(19, 34, 58, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
}

.tt-booking-header {
    margin-bottom: 24px;
}

.tt-booking-header h2,
.tt-booking-step h3 {
    margin: 0 0 8px;
}

.tt-booking-step {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef2f6;
}

.tt-booking-step:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.tt-booking-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tt-booking-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tt-booking-field-help {
    margin: -4px 0 16px;
    font-size: 13px;
    line-height: 1.4;
    color: #5b6573;
}

.tt-booking-field-full {
    grid-column: 1 / -1;
}

.tt-booking-field label {
    font-size: 14px;
    font-weight: 600;
}

.tt-booking-field input,
.tt-booking-field select,
.tt-booking-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd4df;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    color: #172033;
    box-sizing: border-box;
}

.tt-booking-field input:disabled,
.tt-booking-field select:disabled {
    background: #f4f6f8;
    color: #7b8795;
}

.tt-booking-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.tt-booking-alert-error {
    background: #fff1f1;
    color: #9c2525;
    border: 1px solid #efc4c4;
}

.tt-booking-alert-success {
    background: #eefaf0;
    color: #1d6d31;
    border: 1px solid #bedec5;
}

.tt-booking-alert-info {
    background: #e9eff7;
    color: #123f8a;
    border: 1px solid #cbd4df;
}

.tt-booking-alert-warning {
    background: #fff8e6;
    color: #6f4e00;
    border: 1px solid #ead9a2;
}

.tt-booking-alert--icon {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tt-booking-alert--icon[hidden] {
    display: none;
}

.tt-booking-alert__icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.tt-booking-alert__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tt-booking-alert__body {
    min-width: 0;
}

.tt-booking-alert__body strong {
    font-weight: 700;
}

.tt-booking-alert__body p {
    margin: 4px 0 0;
    font-size: 13px;
}

.tt-booking-document-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.tt-booking-document-confirm-actions .tt-booking-button {
    flex: 1 1 180px;
    text-align: center;
}

.tt-booking-field.is-invalid input,
.tt-booking-field.is-invalid select,
.tt-booking-field.is-invalid textarea {
    border-color: #d92d20;
    background: #fffafa;
}

.tt-booking-field.is-invalid label {
    color: #9c2525;
}

.tt-booking-field-error {
    display: block;
    margin-top: 2px;
    max-width: 100%;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #9c2525;
}

.tt-booking-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.tt-booking-slot,
.tt-booking-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #123f8a;
    background: #123f8a;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tt-booking-slot {
    background: #fff;
    color: #123f8a;
}

.tt-booking-slot:hover,
.tt-booking-button:hover {
    transform: translateY(-1px);
}

.tt-booking-slot.is-selected {
    background: #123f8a;
    color: #fff;
}

.tt-booking-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tt-booking-empty,
.tt-booking-summary,
.tt-booking-confirmation {
    padding: 16px;
    border-radius: 12px;
    background: #f6f8fb;
    border: 1px solid #e6ecf2;
}

.tt-booking-summary {
    margin: 16px 0;
}

.tt-booking-confirmation {
    background: #eefaf0;
    border-color: #bedec5;
    font-size: 15px;
    line-height: 1.35;
}

.tt-booking-confirmation strong {
    font-weight: 700;
}

.tt-booking-confirmation p {
    margin: 10px 0 0;
    font-weight: 400;
}

.tt-booking-confirmation h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
}

.tt-booking-completion {
    padding: 0;
}

.tt-booking-payment-action {
    margin-top: 16px;
}

.tt-booking-portal--payment {
    margin-top: 32px;
}

.tt-booking-payment-summary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.tt-booking-payment-summary > strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5b6573;
}

.tt-booking-payment-summary__grid div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tt-booking-payment-summary__grid span {
    color: #5b6573;
    font-size: 13px;
}

.tt-booking-payment-summary__grid strong {
    font-size: 15px;
    font-weight: 600;
}

.tt-booking-payment-summary__grid .tt-booking-payment-highlight {
    font-size: 16px;
    font-weight: 700;
}

.tt-booking-payment-summary__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tt-booking-payment-summary__item--address,
.tt-booking-payment-summary__item--patient {
    grid-column: 1 / -1;
}

.tt-booking-payment-summary__item--service strong {
    font-size: 15px;
    font-weight: 600;
}

.tt-booking-payment-summary__item--therapist strong,
.tt-booking-payment-summary__item--datetime strong {
    font-size: 18px;
    font-weight: 800;
    color: #123f8a;
    line-height: 1.25;
}

.tt-booking-payment-summary__item--address {
    padding: 10px 12px;
    gap: 4px;
    background: #f6f9ff;
    border: 1px solid #dbe7f5;
    border-radius: 12px;
}

.tt-booking-payment-summary__item--address strong {
    font-size: 16px;
    font-weight: 700;
    color: #10275e;
}

.tt-booking-payment-summary__item--amount strong,
.tt-booking-payment-summary__item--amount strong.tt-booking-payment-highlight {
    font-size: 18px;
    font-weight: 700;
    color: #123f8a;
}

.tt-booking-payment-summary__item--patient strong {
    font-weight: 600;
    color: #5b6573;
}

.tt-booking-payment-summary__grid strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tt-booking-payment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.tt-booking-payment-pending-note {
    margin-top: 0;
    color: #5b6573;
    font-size: 13px;
}

.tt-booking-payment-actions .tt-booking-button {
    flex: 1 1 220px;
    text-align: center;
}

.tt-booking-button--ghost {
    border: 1px solid #123f8a;
    background: #ffffff;
    color: #123f8a;
    gap: 6px;
}

.tt-booking-button--ghost:hover {
    background: #f0f6ff;
}

.tt-booking-button--ghost .tt-booking-button__icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}

.tt-booking-button--ghost svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tt-booking-payment-actions > .tt-booking-button:not(.tt-booking-button--ghost),
.tt-booking-payment-actions .tt-booking-button--ghost {
    box-sizing: border-box;
}

.tt-booking-payment-actions > .tt-booking-button:not(.tt-booking-button--ghost) {
    min-height: 52px;
}

.tt-booking-payment-actions .tt-booking-button--ghost {
    min-height: 44px;
    padding: 7px 14px;
    font-size: 15px;
}

.tt-booking-payment-actions .tt-booking-button--ghost .tt-booking-button__icon {
    width: 15px;
    height: 15px;
}

.tt-booking-payment-actions .tt-booking-button--whatsapp {
    border-color: #2e9e5b;
    background: #f0faf4;
    color: #0b6e34;
}

.tt-booking-payment-actions .tt-booking-button--whatsapp:hover {
    background: #e4f6ec;
    border-color: #258a4e;
}

.tt-booking-payment-actions .tt-booking-button--whatsapp:focus-visible {
    outline: 2px solid #0b6e34;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .tt-booking-payment-actions .tt-booking-button--ghost {
        flex: 1 1 100%;
        min-width: 0;
    }
}

.tt-booking-payment-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
}

.tt-booking-payment-badge--paid {
    background: #fff2d8;
    color: #8a5200;
}

.tt-booking-confirmation--success {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tt-booking-confirmation__icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    color: #1d6d31;
}

.tt-booking-confirmation__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tt-booking-confirmation__body {
    min-width: 0;
}

.tt-booking-confirmation__body strong {
    display: block;
    font-size: 15px;
}

.tt-booking-confirmation__body p {
    margin: 4px 0 0;
}

.tt-booking-payment-warning {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #ead9a2;
    border-radius: 12px;
    background: #fff8e6;
    color: #6f4e00;
}

.tt-booking-payment-warning p {
    margin: 0 0 10px;
}

.tt-booking-payment-warning p:last-of-type {
    margin-bottom: 0;
}

.tt-booking-payment-warning__list {
    margin: 12px 0 0;
    padding-left: 18px;
}

.tt-booking-payment-warning__list li + li {
    margin-top: 6px;
}

@media (max-width: 640px) {
    .tt-booking-portal {
        padding: 18px;
    }

    .tt-booking-grid {
        grid-template-columns: 1fr;
    }

    .tt-booking-payment-summary__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Calendario público de fechas ──
   Implementación propia, patrón visual adaptado del calendario admin de
   Disponibilidad (admin/availability/availability.css) sin reutilizar ese archivo. */

.tt-booking-calendar {
    width: 100%;
    box-sizing: border-box;
}

.tt-booking-calendar[hidden] {
    display: none;
}

.tt-booking-calendar__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tt-booking-calendar__title {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #172033;
}

.tt-booking-calendar__nav {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd4df;
    border-radius: 10px;
    background: #ffffff;
    color: #172033;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.tt-booking-calendar__nav:hover:not(:disabled) {
    background: #e9eff7;
    border-color: #9db4d4;
}

.tt-booking-calendar__nav:disabled {
    background: #f4f6f8;
    color: #b6c0cc;
    cursor: not-allowed;
}

.tt-booking-calendar__nav:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.tt-booking-calendar__grid {
    width: 100%;
    overflow-x: auto;
}

.tt-booking-calendar__grid-inner {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    min-width: 280px;
}

.tt-booking-calendar__day-header {
    padding: 4px 0 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #5b6573;
}

.tt-booking-calendar__cell {
    min-width: 0;
}

.tt-booking-calendar__cell.is-other-month .tt-booking-calendar__day {
    opacity: 0.35;
}

.tt-booking-calendar__day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f4f6f8;
    color: #7b8795;
    font-size: 14px;
    font-weight: 600;
    cursor: default;
    box-sizing: border-box;
}

.tt-booking-calendar__day:disabled {
    cursor: not-allowed;
}

.tt-booking-calendar__day.is-past {
    color: #c3ccd6;
    text-decoration: line-through;
}

.tt-booking-calendar__day.is-full {
    background: #f4f6f8;
    color: #b6c0cc;
    text-decoration: line-through;
    border-style: dashed;
    border-color: #d7dee7;
}

.tt-booking-calendar__day.is-potential {
    background: #ffffff;
    border-color: #c4d3ea;
    color: #172033;
    cursor: pointer;
}

.tt-booking-calendar__day.is-potential::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
}

.tt-booking-calendar__day.is-today {
    box-shadow: inset 0 0 0 2px #93b4f0;
}

.tt-booking-calendar__day.is-today.is-potential::after {
    background: #1d4ed8;
}

.tt-booking-calendar__day.is-potential:hover {
    background: #e9eff7;
    border-color: #2563eb;
}

.tt-booking-calendar__day.is-potential:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.tt-booking-calendar__day.is-selected {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    font-weight: 700;
}

.tt-booking-calendar__day.is-selected::after {
    background: #ffffff;
}

.tt-booking-calendar__day.is-selected.is-today {
    box-shadow: inset 0 0 0 2px #1d4ed8;
}

.tt-booking-calendar__status {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5b6573;
    text-align: center;
}

.tt-booking-calendar__status[hidden] {
    display: none;
}

.tt-booking-calendar__legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 12px;
    font-size: 12px;
    color: #5b6573;
}

.tt-booking-calendar__legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.tt-booking-calendar__legend-dot--potential {
    background: #2563eb;
}

.tt-booking-calendar__legend-dot--none {
    background: #c3ccd6;
}

.tt-booking-calendar[aria-busy="true"] .tt-booking-calendar__grid {
    opacity: 0.55;
}

@media (max-width: 640px) {
    .tt-booking-calendar__day {
        min-height: 40px;
        font-size: 13px;
        border-radius: 8px;
    }

    .tt-booking-calendar__nav {
        width: 36px;
        height: 36px;
    }
}
