/* =========================================================
   IPERHOST
   MIS ANUNCIOS / LISTINGS
   MISMO ESTILO QUE BOOKINGS
   ========================================================= */


/* ---------------------------------------------------------
   CONTENEDOR GENERAL
   --------------------------------------------------------- */

.hp-page:has(.hp-listings.hp-table) {
    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-listings.hp-table) > .hp-page__title {
    margin: 0 0 8px;

    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;

    color: var(--iperhost-navy-dark);
}


/* Descripción */

.hp-page:has(.hp-listings.hp-table) > .wp-block-paragraph {
    margin: 0 0 36px;

    font-size: 15px;
    line-height: 1.6;

    color: #718087;
}


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

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


/* =========================================================
   SIDEBAR / MENÚ USUARIO
   IGUAL QUE BOOKINGS
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.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ú */

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

    font-size: 19px;
    font-weight: 700;

    color: var(--iperhost-navy-dark);
}


/* Lista */

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

    list-style: none;
}


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


/* Links */

.hp-page:has(.hp-listings.hp-table)
.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;
}


.hp-page:has(.hp-listings.hp-table)
.hp-menu--user-account
.hp-menu__item > a:hover {
    background: var(--iperhost-cream);

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


/* Página activa */

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

    color: var(--iperhost-navy);

    font-weight: 700;
}


/* ---------------------------------------------------------
   BOTÓN CREAR PROPIEDAD
   IGUAL QUE BOOKINGS
   --------------------------------------------------------- */

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


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


.hp-page:has(.hp-listings.hp-table)
.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-listings.hp-table)
.wp-block-column:first-child
.wp-block-button__link:hover {
    transform: translateY(-1px);

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


/* =========================================================
   COLUMNA DERECHA
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.wp-block-column:nth-child(2) {
    min-width: 0;
}


/* Título sección */

.hp-page:has(.hp-listings.hp-table)
.wp-block-column:nth-child(2)
> .wp-block-heading {
    margin: 0 0 20px;

    font-size: 19px;
    font-weight: 700;

    color: var(--iperhost-navy-dark);
}


/* =========================================================
   TABLA DE ANUNCIOS
   CON APARIENCIA DE CARDS COMO BOOKINGS
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.hp-listings.hp-table {
    width: 100%;

    margin: 0;

    border-collapse: separate;
    border-spacing: 0 18px;

    border: 0;

    background: transparent;
}


/* =========================================================
   FILAS / CARDS
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.hp-listing--edit-block td {
    padding: 20px 16px;

    border-top: 1px solid #e3e9ec;
    border-bottom: 1px solid #e3e9ec;

    background: #ffffff;

    color: #536167;

    font-size: 13px;

    vertical-align: middle;

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


/* Primera celda */

.hp-page:has(.hp-listings.hp-table)
.hp-listing--edit-block td:first-child {
    padding-left: 24px;

    border-left: 1px solid #e3e9ec;

    border-radius: 16px 0 0 16px;
}


/* Última celda */

.hp-page:has(.hp-listings.hp-table)
.hp-listing--edit-block td:last-child {
    padding-right: 24px;

    border-right: 1px solid #e3e9ec;

    border-radius: 0 16px 16px 0;
}


/* Hover */

.hp-page:has(.hp-listings.hp-table)
.hp-listing--edit-block:hover td {
    border-color: #d2dde1;

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


/* =========================================================
   NOMBRE DEL ALOJAMIENTO
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.hp-listing__title {
    min-width: 180px;
}


.hp-page:has(.hp-listings.hp-table)
.hp-listing__title span,
.hp-page:has(.hp-listings.hp-table)
.hp-listing__title a {
    color: var(--iperhost-navy-dark);

    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;

    text-decoration: none;
}


.hp-page:has(.hp-listings.hp-table)
.hp-listing__title a:hover {
    color: var(--iperhost-navy);
}


/* =========================================================
   CATEGORÍA
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.hp-listing__categories {
    color: #65757c;

    font-size: 13px;
}


/* =========================================================
   FECHA
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.hp-listing__created-date {
    color: #879399;

    font-size: 13px;

    white-space: nowrap;
}


/* =========================================================
   ESTADOS
   MISMA LÓGICA VISUAL QUE BOOKINGS
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.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;

    white-space: nowrap;
}


/* Publicado */

.hp-page:has(.hp-listings.hp-table)
.hp-status--publish {
    background: #e8f5ec;

    color: #347547;
}


/* Pendiente */

.hp-page:has(.hp-listings.hp-table)
.hp-status--pending {
    background: #fff5db;

    color: #956a00;
}


/* Eliminado / rechazado */

.hp-page:has(.hp-listings.hp-table)
.hp-status--trash {
    background: #fdecec;

    color: #b33c3c;
}


/* Borrador */

.hp-page:has(.hp-listings.hp-table)
.hp-status--draft {
    background: #eef1f3;

    color: #627177;
}


/* =========================================================
   ACCIONES
   ========================================================= */

.hp-page:has(.hp-listings.hp-table)
.hp-listing__actions {
    text-align: right;

    white-space: nowrap;
}


.hp-page:has(.hp-listings.hp-table)
.hp-listing__actions a,
.hp-page:has(.hp-listings.hp-table)
.hp-listing__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 0;

    border: 0;
    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-listings.hp-table)
.hp-listing__actions a:hover,
.hp-page:has(.hp-listings.hp-table)
.hp-listing__actions button:hover {
    background: var(--iperhost-navy);

    color: #ffffff;

    transform: translateY(-1px);
}


/* =========================================================
   TABLET
   MISMAS MEDIDAS QUE BOOKINGS
   ========================================================= */

@media (max-width: 1024px) {

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


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


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


    .hp-page:has(.hp-listings.hp-table)
    .hp-listing--edit-block td {
        padding-left: 12px;
        padding-right: 12px;
    }

}


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

@media (max-width: 767px) {

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


    .hp-page:has(.hp-listings.hp-table)
    > .hp-page__title {
        margin-bottom: 8px;

        font-size: 27px;
    }


    .hp-page:has(.hp-listings.hp-table)
    > .wp-block-paragraph {
        margin-bottom: 24px;
    }


    /* Columnas */

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


    /* Sidebar igual que bookings */

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

        padding: 18px;
    }


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


    /* Título contenido */

    .hp-page:has(.hp-listings.hp-table)
    .wp-block-column:nth-child(2)
    > .wp-block-heading {
        font-size: 19px;
    }


    /* =====================================================
       TABLA → CARDS
       ===================================================== */

    .hp-page:has(.hp-listings.hp-table)
    .hp-listings.hp-table,
    .hp-page:has(.hp-listings.hp-table)
    .hp-listings.hp-table tbody {
        display: block;

        width: 100%;

        border-spacing: 0;
    }


    .hp-page:has(.hp-listings.hp-table)
    .hp-listing--edit-block {
        display: block;

        width: 100%;

        margin-bottom: 18px;

        overflow: hidden;

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

        background: #ffffff;

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


    .hp-page:has(.hp-listings.hp-table)
    .hp-listing--edit-block td {
        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 16px;

        width: 100%;

        padding: 13px 18px;

        box-sizing: border-box;

        border: 0;
        border-bottom: 1px solid #edf1f3;

        border-radius: 0;

        background: transparent;

        text-align: right;
    }


    /* Nombre arriba */

    .hp-page:has(.hp-listings.hp-table)
    .hp-listing--edit-block
    .hp-listing__title {
        display: block;

        padding:
            20px
            18px
            16px;

        text-align: left;
    }


    .hp-page:has(.hp-listings.hp-table)
    .hp-listing__title span,
    .hp-page:has(.hp-listings.hp-table)
    .hp-listing__title a {
        font-size: 17px;
    }


    /* Estado */

    .hp-page:has(.hp-listings.hp-table)
    .hp-listing__status {
        justify-content: flex-start;

        margin:
            2px
            18px
            14px;

        padding:
            7px
            12px;
    }


    /* Acciones */

    .hp-page:has(.hp-listings.hp-table)
    .hp-listing__actions {
        justify-content: flex-end;

        border-bottom: 0 !important;
    }

}