/* ==========================================================================
   PhotonCode · Agenda de llamada (versión clara, tipo Cal.com)
   Se carga después de style.css, light.css y call.css.
   ========================================================================== */

.booking-action-panel {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 700px;
    padding: 0;
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 40px 100px rgba(34, 24, 110, 0.14), 0 2px 8px rgba(34, 24, 110, 0.04);
}

.booking-action-panel .booking-panels-slider {
    flex: 1;
    min-height: 560px;
}

.booking-action-panel .slider-panel {
    padding: 26px 30px 30px;
}

/* ---------- Cabecera ---------- */
.bk-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px 20px;
    padding: 24px 30px 20px;
    border-bottom: 1px solid rgba(20, 16, 60, 0.07);
    background: linear-gradient(180deg, #faf9ff, #fff);
    border-radius: 32px 32px 0 0;
}

.bk-host {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bk-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    box-shadow: 0 10px 24px rgba(108, 71, 255, 0.3);
}

.bk-avatar svg {
    width: 30px;
    height: 30px;
}

.bk-host small {
    display: block;
    color: #8a8a99;
    font-size: 0.78rem;
    font-weight: 600;
}

.bk-host strong {
    display: block;
    color: #0d0c22;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.bk-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.bk-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f4f3fa;
    color: #3d3b52;
    font-size: 0.8rem;
    font-weight: 600;
}

.bk-meta i {
    color: #6c47ff;
}

.bk-meta .bk-free {
    background: #ecfdf3;
    color: #15803d;
}

.bk-meta .bk-free i {
    color: #16a34a;
}

/* Barra de progreso 1 · 2 · 3 */
.bk-progress {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.bk-progress .booking-step {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    opacity: 1;
}

.bk-progress .booking-step i {
    display: block;
    height: 4px;
    border-radius: 4px;
    background: rgba(20, 16, 60, 0.08);
    overflow: hidden;
    position: relative;
}

.bk-progress .booking-step i::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #00a6ff, #6c47ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.bk-progress .booking-step.is-active i::after {
    transform: scaleX(0.5);
}

.bk-progress .booking-step.is-done i::after {
    transform: scaleX(1);
}

.bk-progress .booking-step span {
    display: block;
    margin-top: 8px;
    color: #9a99a8;
    font-size: 0.76rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.bk-progress .booking-step.is-active span,
.bk-progress .booking-step.is-done span {
    color: #0d0c22;
}

/* ---------- Calendario ---------- */
.booking-action-panel .panel-calendar-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
    gap: 28px;
    height: auto;
}

.booking-action-panel .panel-section-title {
    margin-bottom: 14px;
    color: #0d0c22;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

/* Atajos de fechas */
.bk-quick {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.bk-quick-day {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 10px 4px;
    border: 1px solid rgba(20, 16, 60, 0.1);
    border-radius: 16px;
    background: #fff;
    color: #0d0c22;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, background 0.25s ease;
}

.bk-quick-day small {
    color: #8a8a99;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: capitalize;
}

.bk-quick-day b {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.3rem;
    line-height: 1.1;
}

.bk-quick-day:hover {
    transform: translateY(-2px);
    border-color: rgba(108, 71, 255, 0.45);
    box-shadow: 0 10px 22px rgba(108, 71, 255, 0.12);
}

.bk-quick-day.is-selected {
    border-color: transparent;
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    color: #fff;
    box-shadow: 0 12px 26px rgba(108, 71, 255, 0.32);
}

.bk-quick-day.is-selected small {
    color: rgba(255, 255, 255, 0.8);
}

.booking-action-panel .calendar-month-year {
    color: #0d0c22;
    font-weight: 700;
}

.booking-action-panel .calendar-weekdays span {
    color: #9a99a8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.booking-action-panel .calendar-days-grid {
    gap: 4px;
}

.booking-action-panel .calendar-day-cell {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 0;
    background: none;
    color: #0d0c22;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Días con lugar: fondo lila suave y punto */
.booking-action-panel .calendar-day-cell.current-month-day:not(.disabled-day) {
    background: #f1ecff;
    color: #4b2fd6;
    cursor: pointer;
}

.booking-action-panel .calendar-day-cell.current-month-day:not(.disabled-day)::after {
    content: '';
    position: absolute;
    bottom: 16%;
    left: 50%;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

.booking-action-panel .calendar-day-cell.current-month-day:not(.disabled-day):hover {
    background: #e3d9ff;
    transform: scale(1.08);
}

.booking-action-panel .calendar-day-cell.active-day,
.booking-action-panel .calendar-day-cell.current-month-day.active-day:not(.disabled-day) {
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    color: #fff;
    box-shadow: 0 10px 22px rgba(108, 71, 255, 0.35);
}

.booking-action-panel .calendar-day-cell.is-today {
    box-shadow: inset 0 0 0 2px #6c47ff;
}

.booking-action-panel .calendar-day-cell.disabled-day {
    color: #c9c8d3;
    background: none;
    text-decoration: none;
    cursor: not-allowed;
}

.booking-action-panel .calendar-day-cell.pad-day {
    color: #dedde5;
    background: none;
}

.booking-action-panel .calendar-legend {
    margin-top: 14px;
    color: #8a8a99;
}

/* ---------- Horarios ---------- */
.booking-action-panel .time-slots-side {
    padding-left: 26px;
    border-left: 1px solid rgba(20, 16, 60, 0.07);
}

.booking-action-panel .time-slots-side .panel-section-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bk-day {
    color: #0d0c22;
}

.bk-free-count {
    color: #16a34a;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
}

.booking-action-panel .time-slots-wrapper {
    max-height: 430px;
}

.booking-action-panel .time-slots-list {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.booking-action-panel .time-slots-group {
    color: #8a8a99;
}

.booking-action-panel .time-slot-item {
    padding: 12px 8px;
    border-radius: 14px;
    border: 1px solid rgba(108, 71, 255, 0.25);
    background: #fff;
    color: #4b2fd6;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.booking-action-panel .time-slot-item:hover {
    background: #6c47ff;
    border-color: #6c47ff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(108, 71, 255, 0.28);
}

.booking-action-panel .time-slot-item.active {
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    border-color: transparent;
    color: #fff;
}

.booking-action-panel .time-slot-item.disabled-slot {
    border-color: transparent;
    background: #f5f5f8;
    color: #c4c3cf;
    text-decoration: line-through;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------- Formulario y confirmación ---------- */
.booking-action-panel .form-datetime-pill {
    background: #f1ecff;
    border-color: transparent;
    color: #4b2fd6;
}

.booking-action-panel .btn-confirm-booking {
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    box-shadow: 0 16px 34px rgba(108, 71, 255, 0.3);
}

.booking-action-panel .success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.bk-gcal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

/* ---------- Celular ---------- */
@media (max-width: 900px) {
    .booking-action-panel {
        min-height: 0;
    }

    .booking-action-panel .booking-panels-slider {
        min-height: 1060px;
    }

    .bk-head {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .bk-meta {
        justify-content: flex-start;
    }

    .booking-action-panel .slider-panel {
        padding: 20px;
    }

    .booking-action-panel .panel-calendar-layout {
        grid-template-columns: 1fr;
    }

    .booking-action-panel .time-slots-side {
        padding-left: 0;
        padding-top: 20px;
        border-left: 0;
        border-top: 1px solid rgba(20, 16, 60, 0.07);
    }

    .booking-action-panel .time-slots-wrapper {
        max-height: none;
    }
}

@media (max-width: 420px) {
    .bk-quick {
        gap: 6px;
    }

    .bk-quick-day b {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Distribución: el calendario arriba y a la vista (sin centrar verticalmente)
   ========================================================================== */
.booking-main-section {
    align-items: flex-start;
    min-height: 0;
    padding-top: 110px;
    overflow: clip;
}

.booking-container {
    max-width: 1320px;
}

.booking-split-layout {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(28px, 4vw, 56px);
}

.booking-action-panel {
    position: sticky;
    top: 96px;
}

.booking-info-panel .booking-main-title {
    font-size: clamp(2.4rem, 3.6vw, 3.4rem);
}

/* ==========================================================================
   Formulario después de elegir día y hora
   ========================================================================== */
.bk-form {
    max-width: 640px;
    margin: 0 auto;
}

.bk-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 166, 255, 0.1), rgba(108, 71, 255, 0.12));
    border: 1px solid rgba(108, 71, 255, 0.18);
}

.bk-summary-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    color: #fff;
    font-size: 1.1rem;
}

.booking-action-panel .bk-summary-text {
    display: block;
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #0d0c22;
}

.bk-summary-text small {
    display: block;
    color: #6c47ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bk-summary-text span {
    display: block;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
}

.bk-summary-text span::first-letter {
    text-transform: uppercase;
}

.booking-action-panel .bk-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #4b2fd6;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(20, 16, 60, 0.08);
}

.bk-form-head {
    margin: 22px 0 18px;
}

.booking-action-panel .bk-form-head .form-hero-title {
    margin: 0 0 4px;
    color: #0d0c22;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
}

.booking-action-panel .bk-form-head .form-hero-sub {
    margin: 0;
    color: #6b6a7d;
}

.bk-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.bk-field-wide {
    grid-column: 1 / -1;
}

.bk-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

.bk-fields .bk-field {
    margin-bottom: 0;
}

.bk-field > span:first-child {
    color: #0d0c22;
    font-size: 0.86rem;
    font-weight: 600;
}

.bk-field small {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f0f6;
    color: #8a8a99;
    font-size: 0.7rem;
    font-weight: 600;
}

.bk-input {
    position: relative;
    display: flex;
    align-items: center;
}

.bk-input i {
    position: absolute;
    left: 16px;
    color: #a3a2b3;
    transition: color 0.2s ease;
}

.booking-action-panel .bk-input input,
.booking-action-panel .bk-field textarea {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid rgba(20, 16, 60, 0.12);
    border-radius: 14px;
    background: #fff;
    color: #0d0c22;
    font: inherit;
    font-size: 0.98rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.booking-action-panel .bk-field textarea {
    padding-left: 16px;
    resize: vertical;
}

.booking-action-panel .bk-input input:focus,
.booking-action-panel .bk-field textarea:focus {
    border-color: #6c47ff;
    box-shadow: 0 0 0 4px rgba(108, 71, 255, 0.12);
}

.bk-input:focus-within i {
    color: #6c47ff;
}

.bk-error {
    display: none;
    color: #dc2626;
    font-size: 0.8rem;
    font-style: normal;
}

.bk-field.is-invalid .bk-error {
    display: block;
}

.booking-action-panel .bk-field.is-invalid input {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.bk-field.is-valid .bk-input::after {
    content: '\f00c';
    position: absolute;
    right: 16px;
    color: #16a34a;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.85rem;
}

/* Tipo de proyecto */
.bk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bk-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid rgba(20, 16, 60, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #3d3b52;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.bk-chip i {
    color: #6c47ff;
}

.bk-chip:hover {
    border-color: rgba(108, 71, 255, 0.45);
    transform: translateY(-2px);
}

.bk-chip.is-on {
    border-color: transparent;
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    color: #fff;
}

.bk-chip.is-on i {
    color: #fff;
}

.booking-action-panel .bk-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
    padding: 17px 24px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.booking-action-panel .bk-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(108, 71, 255, 0.38);
}

.bk-submit.is-loading {
    opacity: 0.85;
    pointer-events: none;
}

.bk-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    color: #6b6a7d;
    font-size: 0.8rem;
}

.bk-trust i {
    margin-right: 6px;
    color: #16a34a;
}

/* ==========================================================================
   Celular: título, luego el calendario, luego el resto de la información
   ========================================================================== */
@media (max-width: 900px) {
    .booking-main-section {
        padding-top: 96px;
    }

    .booking-split-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .booking-info-panel {
        display: contents;
    }

    .booking-info-panel > * {
        order: 3;
    }

    .booking-info-panel > .booking-tag,
    .booking-info-panel > .booking-main-title,
    .booking-info-panel > .booking-main-desc {
        order: 1;
    }

    .booking-action-panel {
        position: relative;
        top: auto;
        order: 2;
        margin: 8px 0 24px;
    }

    .booking-info-panel .booking-main-title {
        font-size: clamp(2.2rem, 9vw, 3rem);
    }

    .bk-fields {
        grid-template-columns: 1fr;
    }

    .bk-summary {
        flex-wrap: wrap;
    }
}

/* Días con altura fija: el calendario completo cabe en pantalla */
.booking-action-panel .calendar-day-cell {
    aspect-ratio: auto;
    height: 44px;
    width: 44px;
    margin: 0 auto;
}

.booking-action-panel .booking-panels-slider {
    min-height: 600px;
}

@media (max-width: 420px) {
    .booking-action-panel .calendar-day-cell {
        width: 38px;
        height: 38px;
    }
}

/* Con el formulario abierto, la tarjeta crece para que el botón quede a la vista */
.booking-action-panel .booking-panels-slider:has(#panel-form.active) {
    min-height: 900px;
}

@media (max-width: 900px) {
    .booking-action-panel .booking-panels-slider:has(#panel-form.active) {
        min-height: 1180px;
    }
}

.booking-action-panel:has(#panel-form.active),
.booking-action-panel:has(#panel-success.active) {
    position: relative;
    top: auto;
}

/* Celular: alturas al final para que ganen a las reglas de escritorio */
@media (max-width: 900px) {
    .booking-action-panel .booking-panels-slider {
        min-height: 1060px;
    }

    .booking-action-panel .booking-panels-slider:has(#panel-form.active) {
        min-height: 1180px;
    }

    .bk-summary-text span {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Columna derecha: elegir videollamada o WhatsApp + tarjeta de agenda
   ========================================================================== */
.bk-right {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.bk-right .booking-action-panel {
    position: relative;
    top: auto;
}

.bk-right:has(#panel-form.active),
.bk-right:has(#panel-success.active) {
    position: relative;
    top: auto;
}

.bk-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.bk-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 24px;
    background: #fff;
    border: 1.5px solid rgba(108, 71, 255, 0.18);
    box-shadow: 0 18px 44px rgba(34, 24, 110, 0.08);
    color: #0d0c22;
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.bk-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 50px rgba(34, 24, 110, 0.13);
}

.bk-option.is-active {
    border-color: #6c47ff;
    box-shadow: 0 0 0 4px rgba(108, 71, 255, 0.1), 0 18px 44px rgba(34, 24, 110, 0.08);
}

.bk-option-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #00a6ff, #6c47ff);
    color: #fff;
    font-size: 1.1rem;
}

.bk-option-text {
    flex: 1;
    min-width: 0;
}

.bk-option-text strong {
    display: block;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.bk-option-text small {
    display: block;
    margin-top: 2px;
    color: #6b6a7d;
    font-size: 0.82rem;
}

.bk-option-go {
    color: #6c47ff;
}

/* WhatsApp: mismas características, solo el contorno verde */
.bk-option-wa {
    border-color: rgba(37, 211, 102, 0.55);
}

.bk-option-wa:hover {
    border-color: #25d366;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.12), 0 24px 50px rgba(34, 24, 110, 0.1);
}

.bk-option-wa .bk-option-icon {
    background: #25d366;
}

.bk-option-wa .bk-option-go {
    color: #16a34a;
}

@media (max-width: 900px) {
    .bk-right {
        position: relative;
        top: auto;
        order: 2;
        margin: 8px 0 24px;
    }

    .bk-right .booking-action-panel {
        margin: 0;
    }
}

@media (max-width: 560px) {
    .bk-choice {
        grid-template-columns: 1fr;
    }
}
