/* =========================================================
   IPERHOST
   MIS RESERVAS / BOOKINGS
   ========================================================= */


/* ---------------------------------------------------------
   CONTENEDOR GENERAL
   Solo afecta páginas que contienen .hp-bookings
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings) {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 32px 64px;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   TÍTULO DE PÁGINA
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings) > .hp-page__title {
    margin: 0 0 36px;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--iperhost-navy-dark);
}


/* ---------------------------------------------------------
   COLUMNAS PRINCIPALES
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings) > .wp-block-columns {
    gap: 40px;
    align-items: flex-start;
}


/* =========================================================
   SIDEBAR / MENÚ USUARIO
   ========================================================= */

.hp-page:has(.hp-bookings)
.wp-block-column:first-child {
    padding: 24px;

    border: 1px solid #e3e9ec;
    border-radius: 16px;

    background: #ffffff;

    box-shadow: 0 4px 20px rgba(var(--iperhost-navy-rgb), 0.06);
}


/* Título "Menú de usuario" */

.hp-page:has(.hp-bookings)
.wp-block-column:first-child
.wp-block-heading {
    margin: 0 0 20px;

    font-size: 19px;
    font-weight: 700;
    color: var(--iperhost-navy-dark);
}


/* Lista del menú */

.hp-page:has(.hp-bookings)
.hp-menu--user-account ul {
    margin: 0;
    padding: 0;

    list-style: none;
}


/* Elementos */

.hp-page:has(.hp-bookings)
.hp-menu--user-account
.hp-menu__item {
    margin: 4px 0;
}


/* Links */

.hp-page:has(.hp-bookings)
.hp-menu--user-account
.hp-menu__item > a {
    display: flex;
    align-items: center;

    min-height: 44px;

    padding: 0 14px;

    border-radius: 9px;

    color: #536167;
    text-decoration: none;

    font-size: 14px;
    font-weight: 500;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


/* Hover */

.hp-page:has(.hp-bookings)
.hp-menu--user-account
.hp-menu__item > a:hover {
    background: var(--iperhost-cream);
    color: var(--iperhost-navy);
}


/* Página activa */

.hp-page:has(.hp-bookings)
.hp-menu--user-account
.hp-menu__item--current > a {
    background: var(--iperhost-cream);
    color: var(--iperhost-navy);

    font-weight: 700;
}


/* ---------------------------------------------------------
   BOTÓN CREAR PROPIEDAD
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings)
.wp-block-column:first-child
.wp-block-buttons {
    margin-top: 26px;
}


.hp-page:has(.hp-bookings)
.wp-block-column:first-child
.wp-block-button {
    width: 100%;
}


.hp-page:has(.hp-bookings)
.wp-block-column:first-child
.wp-block-button__link {
    width: 100%;
    box-sizing: border-box;

    padding: 13px 18px;

    border-radius: 10px;

    background: var(--iperhost-navy);
    color: #ffffff;

    text-align: center;

    font-size: 14px;
    font-weight: 600;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.hp-page:has(.hp-bookings)
.wp-block-column:first-child
.wp-block-button__link:hover {
    background: var(--iperhost-gold);
    color: var(--iperhost-navy-dark);

    transform: translateY(-1px);

    box-shadow: 0 7px 18px rgba(var(--iperhost-navy-rgb), 0.22);
}


/* =========================================================
   CONTENIDO / LISTA DE RESERVAS
   ========================================================= */

.hp-page:has(.hp-bookings)
.hp-bookings {
    width: 100%;
}


/* Espacio entre reservas */

.hp-page:has(.hp-bookings)
.hp-bookings
.hp-grid__item {
    margin-bottom: 18px;
}


/* ---------------------------------------------------------
   TARJETA DE RESERVA
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings)
.hp-booking--view-block {
    overflow: hidden;

    border: 1px solid #e3e9ec;
    border-radius: 16px;

    background: #ffffff;

    box-shadow: 0 4px 18px rgba(var(--iperhost-navy-rgb), 0.05);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


.hp-page:has(.hp-bookings)
.hp-booking--view-block:hover {
    transform: translateY(-2px);

    border-color: var(--iperhost-gold);

    box-shadow: 0 9px 26px rgba(var(--iperhost-navy-rgb), 0.09);
}


/* Contenido */

.hp-page:has(.hp-bookings)
.hp-booking--view-block
.hp-listing__content {
    padding: 24px 26px 18px;
}


/* ---------------------------------------------------------
   TÍTULO BOOKING #XXXX
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings)
.hp-booking--view-block
.hp-listing__title {
    margin: 0 0 14px;

    font-size: 19px;
    line-height: 1.3;
}


.hp-page:has(.hp-bookings)
.hp-booking--view-block
.hp-listing__title a {
    color: var(--iperhost-navy-dark);
    text-decoration: none;

    font-weight: 700;
}


.hp-page:has(.hp-bookings)
.hp-booking--view-block
.hp-listing__title a:hover {
    color: var(--iperhost-navy);
}


/* ---------------------------------------------------------
   NOMBRE DEL ALOJAMIENTO
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings)
.hp-booking__listing {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 10px;

    color: var(--iperhost-navy);
    text-decoration: none;

    font-size: 14px;
    font-weight: 600;
}


.hp-page:has(.hp-bookings)
.hp-booking__listing:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   FECHA DE CREACIÓN
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings)
.hp-listing__created-date {
    display: block;

    margin: 4px 0 12px;

    font-size: 13px;
    color: #879399;
}


/* =========================================================
   CHIPS DE ESTADO
   ========================================================= */

.hp-page:has(.hp-bookings)
.hp-listing__status {
    display: inline-flex;
    align-items: center;

    width: auto;

    padding: 6px 11px;

    border-radius: 999px;

    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}


/* Confirmada */

.hp-page:has(.hp-bookings)
.hp-status--publish {
    background: #e8f5ec;
    color: #347547;
}


/* Cancelada */

.hp-page:has(.hp-bookings)
.hp-status--trash {
    background: #fdecec;
    color: #b33c3c;
}


/* Pendiente - por si HivePress la genera */

.hp-page:has(.hp-bookings)
.hp-status--pending {
    background: #fff5db;
    color: #956a00;
}


/* =========================================================
   FOOTER DE LA RESERVA
   ========================================================= */

.hp-page:has(.hp-bookings)
.hp-booking--view-block
.hp-listing__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 16px 26px;

    border-top: 1px solid #edf1f3;

    background: var(--iperhost-cream);
}


/* ---------------------------------------------------------
   CHIP DE FECHAS
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings)
.hp-booking__dates {
    display: inline-flex;
    align-items: center;

    padding: 7px 12px;

    border-radius: 999px;

    background: var(--iperhost-cream);
    color: #34474f;

    font-size: 13px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   BOTÓN MENSAJE
   --------------------------------------------------------- */

.hp-page:has(.hp-bookings)
.hp-listing__action--message {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: var(--iperhost-cream);
    color: var(--iperhost-navy);

    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.hp-page:has(.hp-bookings)
.hp-listing__action--message:hover {
    background: var(--iperhost-gold);
    color: var(--iperhost-navy-dark);

    transform: translateY(-1px);
}


/* =========================================================
   MODAL MENSAJES
   ========================================================= */

.hp-page:has(.hp-bookings)
.hp-form--message-send textarea {
    width: 100%;
    min-height: 130px;

    padding: 14px;

    box-sizing: border-box;

    border: 1px solid #d9e0e3;
    border-radius: 10px;

    resize: vertical;
}


.hp-page:has(.hp-bookings)
.hp-form--message-send textarea:focus {
    outline: none;

    border-color: var(--iperhost-navy);

    box-shadow: 0 0 0 3px rgba(var(--iperhost-navy-rgb), 0.10);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .hp-page:has(.hp-bookings) {
        padding: 38px 28px 54px;
    }


    .hp-page:has(.hp-bookings) > .hp-page__title {
        font-size: 32px;
    }


    .hp-page:has(.hp-bookings) > .wp-block-columns {
        gap: 26px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .hp-page:has(.hp-bookings) {
        padding: 26px 18px 42px;
    }


    .hp-page:has(.hp-bookings) > .hp-page__title {
        margin-bottom: 24px;

        font-size: 27px;
    }


    /* Columnas una debajo de otra */

    .hp-page:has(.hp-bookings)
    > .wp-block-columns {
        display: block;
    }


    .hp-page:has(.hp-bookings)
    .wp-block-column:first-child {
        margin-bottom: 26px;

        padding: 18px;
    }


    /* Ocultamos título redundante si se desea */

    .hp-page:has(.hp-bookings)
    .wp-block-column:first-child
    .wp-block-heading {
        font-size: 17px;
    }


    /* Cards */

    .hp-page:has(.hp-bookings)
    .hp-booking--view-block
    .hp-listing__content {
        padding: 20px 18px 16px;
    }


    .hp-page:has(.hp-bookings)
    .hp-booking--view-block
    .hp-listing__footer {
        align-items: flex-start;
        flex-direction: column;

        padding: 15px 18px;
    }


    .hp-page:has(.hp-bookings)
    .hp-booking__dates {
        width: 100%;
        box-sizing: border-box;

        justify-content: center;
    }


    .hp-page:has(.hp-bookings)
    .hp-listing__actions--primary {
        width: 100%;
    }


    .hp-page:has(.hp-bookings)
    .hp-listing__action--message {
        width: 100%;

        border-radius: 9px;
    }

}