/* ==========================================================================
   Etiquetas de propiedades con sello
   Componente documentado en style-guide.html (seccion 7, "Sellos de etiqueta").
   ========================================================================== */

.mt-prop__media,
.mt-prop-detail__gallery {
    position: relative;
}

/* Sello sobre la imagen ---------------------------------------------------- */
/* Selectores reforzados: las reglas `.mt-prop__media img` y
   `.mt-prop-detail__gallery img` (foto a ancho completo, oculta si no es la
   activa) no deben aplicar al sello. */
.mt-prop .mt-prop__media img.mt-seal,
.mt-prop-detail__gallery img.mt-seal {
    position: absolute;
    z-index: 9;
    display: block;
    height: auto;
    max-height: none;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    background: var(--bg-white, #fff);
    box-shadow: 0 0 0 2px var(--bg-white, #fff), 0 2px 8px rgba(0, 0, 0, 0.28);
    transform: none;
    pointer-events: auto;
}

.mt-prop-detail__gallery img.mt-seal--detail {
    width: clamp(72px, 11vw, 132px);
}

/* Grupo de sellos por esquina (metrotheme_labels_render_seal_group) -------- */
/* Tamaño de un sello solo (`one`) y de varios a la vez (`many`). En tarjetas
   se calcula sobre el ancho de la foto (cqw); en la ficha, sobre la ventana. */
.mt-prop .mt-prop__media {
    container-type: inline-size;
}

.mt-seals {
    --mt-seal-one: clamp(52px, 20cqw, 72px);
    --mt-seal-many: clamp(34px, 14cqw, 48px);
    --mt-seal-w: var(--mt-seal-one);
    --mt-seal-speed: 0.5s;
    position: absolute;
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.mt-seals--size-sm {
    --mt-seal-one: clamp(40px, 15cqw, 56px);
    --mt-seal-many: clamp(28px, 11cqw, 38px);
}

.mt-seals--size-lg {
    --mt-seal-one: clamp(64px, 25cqw, 92px);
    --mt-seal-many: clamp(42px, 17cqw, 60px);
}

.mt-seals--detail {
    --mt-seal-one: clamp(72px, 11vw, 132px);
    --mt-seal-many: clamp(56px, 8vw, 96px);
}

.mt-seals--detail.mt-seals--size-sm {
    --mt-seal-one: clamp(56px, 8vw, 100px);
    --mt-seal-many: clamp(44px, 6vw, 72px);
}

.mt-seals--detail.mt-seals--size-lg {
    --mt-seal-one: clamp(88px, 14vw, 160px);
    --mt-seal-many: clamp(64px, 10vw, 116px);
}

.mt-seals.mt-seal--top-right,
.mt-seals.mt-seal--bottom-right {
    flex-direction: row-reverse;
}

.mt-seals--multi {
    gap: 4px;
}

.mt-seals img.mt-seal.mt-seal {
    position: static;
    flex: 0 0 auto;
    display: block;
    width: var(--mt-seal-w);
    height: auto;
    max-height: none;
    margin: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    background: var(--bg-white, #fff);
    box-shadow: 0 0 0 2px var(--bg-white, #fff), 0 2px 8px rgba(0, 0, 0, 0.28);
    transform: none;
    pointer-events: auto;
}

/* Modos por ancho: `--d-*` escritorio y `--m-*` movil (all | rotate | primary).
   Sin JS, "rotate" se comporta como "all". */
@media (min-width: 769px) {
    .mt-seals--multi.mt-seals--d-all,
    .mt-seals--multi.mt-seals--d-rotate:not(.is-rotating) {
        --mt-seal-w: var(--mt-seal-many);
    }

    .mt-seals.mt-seals--d-primary:not(.mt-seals--has-primary),
    .mt-seals.mt-seals--d-primary img.mt-seal:not(.mt-seal--primary),
    .mt-seals.mt-seals--d-primary .mt-seals__more,
    .mt-seals.mt-seals--d-all img.mt-seal.mt-seal--overflow,
    .mt-seals.mt-seals--d-rotate:not(.is-rotating) img.mt-seal.mt-seal--overflow {
        display: none;
    }
}

@media (max-width: 768px) {
    .mt-seals--multi.mt-seals--m-all,
    .mt-seals--multi.mt-seals--m-rotate:not(.is-rotating) {
        --mt-seal-w: var(--mt-seal-many);
    }

    .mt-seals.mt-seals--m-primary:not(.mt-seals--has-primary),
    .mt-seals.mt-seals--m-primary img.mt-seal:not(.mt-seal--primary),
    .mt-seals.mt-seals--m-primary .mt-seals__more,
    .mt-seals.mt-seals--m-all img.mt-seal.mt-seal--overflow,
    .mt-seals.mt-seals--m-rotate:not(.is-rotating) img.mt-seal.mt-seal--overflow {
        display: none;
    }
}

/* Alternancia: los sellos se apilan y solo se ve el actual. */
.mt-seals.is-rotating {
    display: grid;
}

.mt-seals.is-rotating img.mt-seal.mt-seal {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--mt-seal-speed) ease, transform var(--mt-seal-speed) ease, visibility 0s linear var(--mt-seal-speed);
}

.mt-seals.is-rotating img.mt-seal.is-current {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.mt-seals.is-rotating .mt-seals__more {
    display: none;
}

.mt-seals--fx-slide.is-rotating img.mt-seal.mt-seal {
    transform: translateX(60%);
}

.mt-seals--fx-slide.is-rotating img.mt-seal.is-prev {
    transform: translateX(-60%);
}

.mt-seals--fx-slide.is-rotating img.mt-seal.is-current {
    transform: none;
}

.mt-seals__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    pointer-events: auto;
}

.mt-seal--top-left { top: 12px; left: 12px; }
.mt-seal--top-right { top: 12px; right: 12px; }
.mt-seal--bottom-left { bottom: 12px; left: 12px; }
.mt-seal--bottom-right { bottom: 12px; right: 12px; }

/* No tapar el badge de destacada (arriba derecha) ni la fecha de Open House (arriba izquierda). */
.mt-prop--featured .mt-seal--top-right,
.mt-prop-detail__gallery:has(.mt-prop__badge--gallery) .mt-seal--top-right {
    top: 48px;
}

.mt-prop:has(.mt-prop__openhouse-date) .mt-seal--top-left {
    top: 104px;
}

.mt-prop-detail__gallery:has(.mt-prop-detail__openhouse-calendar) .mt-seal--top-left {
    top: 120px;
}

/* Que los puntos del slider no queden debajo de un sello inferior. */
.mt-prop__media .mt-seal--bottom-left,
.mt-prop__media .mt-seal--bottom-right {
    bottom: 28px;
}

/* Chips del buscador ------------------------------------------------------- */
.mt-search__labels {
    margin-top: 12px;
}

.mt-search__labels .mt-advanced__label {
    display: block;
    margin-bottom: 8px;
}

.mt-search__labels-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mt-label-chip {
    position: relative;
    cursor: pointer;
}

.mt-label-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.mt-label-chip__body {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 999px;
    background: var(--bg-light, #F8F9FA);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark, #1f2937);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.mt-label-chip__seal {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 50%;
    background: var(--bg-white, #fff);
}

.mt-label-chip input:checked + .mt-label-chip__body {
    border-color: var(--remax-blue, #003DA5);
    background: #e8eefa;
    color: var(--remax-blue, #003DA5);
}

.mt-label-chip input:focus-visible + .mt-label-chip__body {
    outline: 2px solid var(--remax-blue, #003DA5);
    outline-offset: 2px;
}

/* Lista de etiquetas en la ficha ------------------------------------------- */
.mt-prop-detail__labels {
    margin: 24px 0;
}

.mt-prop-labels {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.mt-prop-labels__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--border-radius-lg, 12px);
    background: var(--bg-white, #fff);
}

.mt-prop-labels__seal {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 50%;
    background: var(--bg-white, #fff);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
    flex: 0 0 auto;
}

.mt-prop-labels__name {
    font-weight: 700;
    color: var(--remax-blue, #003DA5);
    text-decoration: none;
}

.mt-prop-labels__name:hover {
    text-decoration: underline;
}

.mt-prop-labels__desc {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-gray, #475569);
}

.mt-prop-labels__more {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--remax-blue, #003DA5);
    text-decoration: none;
}

.mt-prop-labels__more:hover,
.mt-prop-labels__more:focus-visible {
    text-decoration: underline;
}

/* Pagina publica de la etiqueta -------------------------------------------- */
.mt-label-landing__hero {
    display: flex;
    gap: 24px;
    align-items: center;
    max-width: 1200px;
    margin: 24px auto;
    padding: 24px;
    border-radius: var(--border-radius-xl, 16px);
    background: var(--bg-light, #F8F9FA);
    box-sizing: border-box;
}

.mt-label-landing__seal {
    width: clamp(88px, 14vw, 140px);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    background: var(--bg-white, #fff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    flex: 0 0 auto;
}

.mt-label-landing__title {
    margin: 0 0 8px;
}

.mt-label-landing__desc p {
    margin: 0 0 8px;
    color: var(--text-gray, #475569);
}

.mt-label-landing__long {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 24px;
    box-sizing: border-box;
    line-height: 1.7;
}

.mt-label-landing__long p {
    margin: 0 0 12px;
    color: var(--text-gray, #475569);
}

@media (max-width: 768px) {
    .mt-label-landing__hero {
        flex-direction: column;
        text-align: center;
        margin: 12px;
        padding: 20px 16px;
    }

    .mt-label-landing__long {
        padding: 0 16px;
    }
}
