.rental-card {
    --rental-surface: #fff;
    --rental-text: #333;
    --rental-border: #ccc;
    --rental-owner: #007b9f;
    --rental-price: #2196d2;
    --rental-info: #055b7d;
    --rental-verified: #56bd7b;
    --rental-badge: #0099de;
    --rental-muted: #617894;
    --rental-gap: 5px;
    --rental-padding: 15px;
    --rental-font: "Poppins", sans-serif;
    --rental-small: 10px;
    --rental-label: 12px;
    --rental-title: 15px;
    --rental-bold: 700;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 394px;
    overflow: hidden;
    border: 1px solid var(--rental-border);
    border-radius: 1px;
    background: var(--rental-surface);
    color: var(--rental-text);
    font-family: var(--rental-font);
}

.rental-card *,
.rental-card *::before,
.rental-card *::after {
    box-sizing: border-box;
}

.rental-card__image {
    position: relative;
    flex: 0 0 200px;
    height: 200px;
    margin: 0;
    overflow: hidden;
    background-color: #ddd;
    background-image: url("../imagenes/imagen-no-disponible.jpg");
    background-position: center;
    background-size: cover;
}

.rental-card__photo {
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    transition: transform .25s ease;
}

.rental-card:hover .rental-card__photo {
    transform: scale(1.05);
}

.rental-card__badges {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: var(--rental-gap);
    padding: var(--rental-padding);
}

.rental-card__verified,
.rental-card__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rental-gap);
    height: 25px;
    padding: 0 var(--rental-gap);
    background: var(--rental-badge);
    color: var(--rental-surface);
    font-size: var(--rental-small);
    font-weight: var(--rental-bold);
    line-height: 15px;
}

.rental-card__verified {
    padding: 0 3px;
    background: var(--rental-verified);
    text-transform: uppercase;
}

.rental-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--rental-gap);
    min-width: 0;
    min-height: 192px;
    padding: var(--rental-padding);
}

.rental-card__body {
    display: flex;
    flex-direction: column;
}

.rental-card__owner {
    margin: 0;
    color: var(--rental-owner);
    font-size: var(--rental-small);
    font-weight: var(--rental-bold);
    line-height: 14px;
}

.rental-card__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 6px;
    color: var(--rental-text);
    font-size: var(--rental-title);
    font-weight: var(--rental-bold);
    line-height: 21px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rental-card__link,
.rental-card__link:hover {
    color: inherit;
    text-decoration: none;
}

.rental-card__link:hover {
    color: var(--rental-info);
}

.rental-card__link::after {
    position: absolute;
    inset: 0;
    content: "";
}

.rental-card__location,
.rental-card__people {
    display: flex;
    align-items: center;
    gap: var(--rental-gap);
    min-width: 0;
    font-size: var(--rental-small);
    line-height: 15px;
}

.rental-card__location span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rental-card__location img,
.rental-card__people img {
    flex-shrink: 0;
}

.rental-card__icon--list,
.rental-card__description,
.rental-card__services {
    display: none;
}

.rental-card__details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rental-card__footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.rental-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--rental-gap);
    color: var(--rental-text);
    font-size: var(--rental-label);
    line-height: 20px;
}

.rental-card__price-value {
    color: var(--rental-price);
    font-size: var(--rental-title);
    font-weight: var(--rental-bold);
}

.rental-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--rental-gap);
    width: 100%;
}

.rental-card__button,
.rental-card__button:hover {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rental-gap);
    min-height: 31px;
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    color: var(--rental-surface);
    font-family: inherit;
    font-size: var(--rental-label);
    font-weight: var(--rental-bold);
    line-height: 19px;
    text-decoration: none;
    text-transform: uppercase;
}

.rental-card__button--info {
    background: var(--rental-info);
    transition: background-color 150ms ease;
}

.rental-card__button--whatsapp {
    background: #00bd07;
    cursor: pointer;
}

.rental-card__button--whatsapp img,
.aviso-gratis__whatsapp img {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.rental-card__button--info:hover {
    background: #055271;
    color: var(--rental-surface);
}

.rental-card button:focus-visible,
.rental-card a:focus-visible {
    outline: 2px solid var(--rental-info);
    outline-offset: 2px;
}

.rental-card__link:focus-visible::after {
    outline: 2px solid var(--rental-info);
    outline-offset: -3px;
}

@media (min-width: 768px) {
    .grid.--list > .rental-card {
        flex-direction: row;
        min-height: 160px;
    }

    .grid.--list > .rental-card .rental-card__image {
        flex-basis: 180px;
        height: auto;
        min-height: 158px;
    }

    .grid.--list > .rental-card .rental-card__badges {
        padding: 8px;
    }

    .grid.--list > .rental-card .rental-card__content {
        min-height: 158px;
        padding-top: 10px;
    }

    .grid.--list > .rental-card .rental-card__heading {
        display: flex;
        flex-direction: column;
        gap: var(--rental-gap);
    }

    .grid.--list > .rental-card .rental-card__title {
        margin-bottom: 0;
        line-height: 20px;
        -webkit-line-clamp: 1;
    }

    .grid.--list > .rental-card .rental-card__location,
    .grid.--list > .rental-card .rental-card__people {
        font-size: var(--rental-label);
        line-height: 20px;
    }

    .grid.--list > .rental-card .rental-card__icon--grid {
        display: none;
    }

    .grid.--list > .rental-card .rental-card__icon--list {
        display: block;
    }

    .grid.--list > .rental-card .rental-card__details {
        margin-top: var(--rental-gap);
    }

    .grid.--list > .rental-card .rental-card__services {
        display: flex;
        align-items: center;
        gap: var(--rental-gap);
        padding-left: var(--rental-gap);
        border-left: 1px solid var(--rental-border);
    }

    .grid.--list > .rental-card .rental-card__description {
        display: -webkit-box;
        overflow: hidden;
        margin: 0;
        color: var(--rental-text);
        font-size: var(--rental-small);
        line-height: 14px;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }

    .grid.--list > .rental-card .rental-card__footer {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--rental-gap);
    }

    .grid.--list > .rental-card .rental-card__price {
        color: var(--rental-muted);
        font-size: var(--rental-small);
    }

    .grid.--list > .rental-card .rental-card__actions {
        flex: 1;
        width: auto;
        margin-left: auto;
    }
}

.aviso-gratis {
    position: relative;
}

.aviso-gratis__overlay {
    position: absolute;
    z-index: 1;
    inset: 0;
}

.aviso-gratis__overlay:focus-visible {
    outline: 2px solid #055b7d;
    outline-offset: 2px;
}

.aviso-gratis__body-footer {
    flex-wrap: wrap;
    row-gap: 8px;
}

.aviso-gratis__actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 5px;
    width: 100%;
    margin-left: auto;
}

.aviso-gratis__actions .aviso-gratis__link {
    flex: 0 0 31px;
    width: 31px;
    height: auto;
    min-height: 31px;
    margin-left: 0;
    transition: background-color 250ms ease;
}

.aviso-gratis__actions .aviso-gratis__link:hover {
    background-color: #e3e6ef;
}

/* Listado desktop: card horizontal, precio y botones entran en una sola fila */
@media (min-width: 768px) {
    .avisos-gratis.--listado .aviso-gratis__body-footer {
        flex-wrap: nowrap;
    }

    .avisos-gratis.--listado .aviso-gratis__actions {
        width: auto;
    }
}

.aviso-gratis__whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 31px;
    padding: 0 10px;
    border: 0;
    background: #00bd07;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 19px;
    text-transform: uppercase;
    cursor: pointer;
}

.rental-list-contact {
    --contact-border: #ccc;
    --contact-muted: #617894;
    --contact-info: #055b7d;
    position: fixed;
    inset: 0;
    display: block;
    width: 450px;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    /* visible: si el dialog recorta, el popover del calendario (v-calendar/Popper)
       genera scroll y se desplaza, y la flecha deja de apuntar al input */
    overflow: visible;
    margin: auto;
    padding: 11px 0 0;
    border: 0;
    background: transparent;
    color: #333;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    line-height: 18px;
}

.rental-list-contact:not([open]) {
    display: none;
}

.rental-list-contact[open] {
    animation: list-contact-dialog-in 240ms ease-out both;
}

.rental-list-contact[open].rental-list-contact--closing {
    animation: list-contact-dialog-out 180ms ease-in both;
    pointer-events: none;
}

.rental-list-contact::backdrop {
    background: rgb(0 0 0 / 50%);
    animation: list-contact-backdrop-in 240ms ease-out both;
}

.rental-list-contact--closing::backdrop {
    animation: list-contact-backdrop-out 180ms ease-in both;
}

.rental-list-contact__panel {
    position: relative;
    overflow: visible;
    padding: 14px 15px 16px;
    background: #fff;
    box-shadow: 0 4px 16px rgb(0 0 0 / 15%);
}

.rental-list-contact__panel,
.rental-list-contact__panel * {
    box-sizing: border-box;
}

.rental-list-contact__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.rental-list-contact__header h2 {
    margin: 0;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
}

.rental-list-contact__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #617894;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.rental-list-contact__property {
    margin: 0 0 15px;
    color: #333;
    font-size: 10px;
    line-height: 14px;
}

.rental-list-contact__instruction {
    position: absolute;
    z-index: 1;
    top: -11px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    max-width: calc(100% - 20px);
    margin: 0;
    padding: 0 10px;
    border-radius: 7px;
    background: #ff8000;
    color: #fff;
    font-size: 10px;
    line-height: 11px;
    white-space: nowrap;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
}

.rental-list-contact__instruction--visible {
    animation: list-contact-instruction-in 300ms ease-out 250ms forwards;
}

.rental-list-contact__instruction img {
    position: absolute;
    top: 19px;
    left: calc(50% - 5px);
}

.rental-list-contact form {
    margin: 0;
}

.rental-list-contact__whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: #00c700;
    color: #fff;
    font: 700 12px/18px "Poppins", sans-serif;
    text-align: center;
    cursor: pointer;
    transition: background-color 250ms ease;
}

.rental-list-contact__whatsapp * {
    pointer-events: none;
}

.rental-list-contact__whatsapp img {
    flex: 0 0 18px;
    filter: brightness(0) invert(1);
}

.rental-list-contact__whatsapp:hover,
.rental-list-contact__whatsapp:focus {
    background: #00aa06;
    color: #fff;
}

.rental-list-contact__whatsapp:disabled {
    opacity: .7;
    cursor: progress;
}

.rental-list-contact__whatsapp:focus-visible {
    outline: 2px solid #055b7d;
    outline-offset: 2px;
}

/* Estado de error del botón (mismo criterio que .fichaform__submit.--error de la ficha) */
.rental-list-contact__whatsapp-error-icon,
.rental-list-contact__whatsapp-error-text {
    display: none;
}

.rental-list-contact__whatsapp.--error,
.rental-list-contact__whatsapp.--error:hover,
.rental-list-contact__whatsapp.--error:focus {
    background: #c00;
}

.rental-list-contact__whatsapp.--error .rental-list-contact__whatsapp-icon,
.rental-list-contact__whatsapp.--error .rental-list-contact__whatsapp-text {
    display: none;
}

.rental-list-contact__whatsapp.--error .rental-list-contact__whatsapp-error-icon {
    display: inline-block;
}

.rental-list-contact__whatsapp.--error .rental-list-contact__whatsapp-error-text {
    display: inline;
}

.rental-list-contact__close:focus-visible {
    outline: 2px solid #055b7d;
    outline-offset: 2px;
}

@keyframes list-contact-dialog-in {
    from { opacity: 0; transform: translateY(24px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes list-contact-dialog-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(18px) scale(.98); }
}

@keyframes list-contact-backdrop-in {
    from { background-color: rgb(0 0 0 / 0%); }
    to { background-color: rgb(0 0 0 / 50%); }
}

@keyframes list-contact-backdrop-out {
    from { background-color: rgb(0 0 0 / 50%); }
    to { background-color: rgb(0 0 0 / 0%); }
}

@keyframes list-contact-instruction-in {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.aviso-gratis__whatsapp {
    position: relative;
    z-index: 2;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 19px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.rental-card__button--whatsapp:hover,
.aviso-gratis__whatsapp:hover {
    background: #00aa06;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 575px) {
    .rental-list-contact {
        width: 100%;
        max-width: 100%;
        max-height: 100dvh;
        inset: auto 0 0;
        margin: 0;
        padding-top: 11px;
    }
    .rental-list-contact__panel {
        padding: 14px 15px 16px;
    }

    .rental-list-contact[open].rental-list-contact--closing {
        animation-name: list-contact-dialog-out-mobile;
    }
}

/* Pantallas muy bajas: el formulario no entra, se permite scroll */
@media (max-height: 560px) {
    .rental-list-contact {
        overflow-y: auto;
    }
}

@keyframes list-contact-dialog-out-mobile {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
    .rental-list-contact[open],
    .rental-list-contact[open].rental-list-contact--closing,
    .rental-list-contact::backdrop,
    .rental-list-contact--closing::backdrop,
    .rental-list-contact__instruction {
        animation: none;
    }

    .rental-list-contact__instruction {
        opacity: 1;
    }
}
