/* ─── Pxsol Search Drawer (floating sign triggered by "Reservar Habitación") ─── */

#pxsol-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 25, 35, 0.45);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#pxsol-drawer-overlay.pxsol-drawer-visible {
    opacity: 1;
    visibility: visible;
}

body.pxsol-drawer-lock {
    overflow: hidden;
}

/* ── Tarjeta flotante (no ocupa toda la altura, deja aire arriba) ── */
#pxsol-drawer {
    position: fixed;
    top: 110px;
    right: 24px;
    width: 420px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 140px);
    background: #ede8dc;
    z-index: 999999;
    border-radius: 6px;
    box-shadow: 10px 10px 70px rgba(0, 0, 0, 0.4);
    transform: translateX(120%);
    transition: transform 0.35s ease;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 28px 28px 24px;
    font-family: inherit;
    color: #333;
}

#pxsol-drawer *,
#pxsol-drawer *::before,
#pxsol-drawer *::after {
    color: inherit;
    box-sizing: border-box;
}

#pxsol-drawer.pxsol-drawer-open {
    transform: translateX(0);
}

/* ── Botón cerrar (esquina de la tarjeta) ── */
#pxsol-drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #1e3354 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

#pxsol-drawer-close:hover {
    background: rgba(30, 51, 84, 0.08);
}

/* ── Cabecera (título + badge, igual al hero) ── */
.pxsol-drawer-header {
    padding-right: 32px;
    margin-bottom: 0;
}

.pxsol-drawer-title {
    font-family: AppleGaramondLightItalic, serif !important;
    font-size: 22px !important;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.1px !important;
    color: #1e3354 !important;
    margin: 0;
    line-height: 1.4 !important;
    padding-bottom: 0.5em !important;
}

.pxsol-drawer-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8b1c1c !important;
    border: 1.5px solid #8b1c1c !important;
    background: transparent !important;
    padding: 7px 11px;
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1.3;
}

.pxsol-drawer-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.13);
    margin: 18px 0 20px;
}

/* ── Campos ── */
.pxsol-drawer-field {
    margin-bottom: 14px;
    position: relative;
}

.pxsol-drawer-field label {
    display: block;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1e3354 !important;
    margin-bottom: 7px;
}

.pxsol-drawer-field input[type="date"] {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-radius: 3px;
    font-size: 14px;
    color: #333 !important;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s;
}

.pxsol-drawer-field input[type="date"]:focus {
    outline: none;
    border-color: #1e3354 !important;
}

.pxsol-drawer-field input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
}

/* ── Botón huéspedes ── */
#pxsol-drawer-guests-toggle {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-radius: 3px;
    font-size: 14px;
    color: #333 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s;
    gap: 8px;
    text-align: left;
}

#pxsol-drawer-guests-toggle:hover,
#pxsol-drawer-guests-toggle:focus {
    border-color: #1e3354;
    outline: none;
}

#pxsol-drawer-guests-toggle svg {
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.2s;
}

#pxsol-drawer-guests-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* ── Panel de huéspedes (portaleado a <body> vía JS, igual que hero/sidebar) ── */
/* position:fixed y top/left los setea el JS para escapar del overflow del drawer */
#pxsol-drawer-guests-panel {
    position: fixed;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px;
    z-index: 1000000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    min-width: 270px;
    width: 300px;
    box-sizing: border-box;
}

.pxsol-drawer-counter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;
}

.pxsol-drawer-counter-row:last-of-type {
    border-bottom: none;
}

.pxsol-drawer-counter-label span {
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e !important;
    display: block;
    line-height: 1.2;
}

.pxsol-drawer-counter-label small {
    font-size: 11px;
    color: #999 !important;
    font-weight: 400;
}

.pxsol-drawer-counter {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pxsol-drawer-counter-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid #ccc;
    border-radius: 50%;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555 !important;
    padding: 0;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.pxsol-drawer-counter-btn:hover {
    border-color: #1e3354;
    color: #1e3354 !important;
}

.pxsol-drawer-counter > span {
    min-width: 22px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #1e1e1e !important;
}

.pxsol-drawer-confirm-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: #1e3354;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background 0.15s;
    font-family: inherit;
}

.pxsol-drawer-confirm-btn:hover {
    background: #c4a46c;
}

/* ── Botón principal ── */
#pxsol-drawer .pxsol-drawer-submit-btn {
    width: 100%;
    height: 54px;
    background: #b5924a;
    color: #fff !important;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    margin-top: 8px;
    margin-bottom: 14px;
}

#pxsol-drawer .pxsol-drawer-submit-btn:hover:not(:disabled) {
    background: #9e7e3e;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

#pxsol-drawer .pxsol-drawer-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Pie de tarjeta ── */
.pxsol-drawer-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #555 !important;
}

.pxsol-drawer-footer svg {
    flex-shrink: 0;
    color: #8b1c1c !important;
}

/* ── Error ── */
.pxsol-drawer-error {
    color: #8b1c1c !important;
    font-size: 13px;
    padding: 9px 13px;
    background: rgba(139, 28, 28, 0.07);
    border: 1px solid rgba(139, 28, 28, 0.2);
    border-radius: 6px;
    margin-bottom: 14px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    #pxsol-drawer {
        top: 90px;
        right: 12px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 110px);
        padding: 22px 20px 20px;
    }
}
