/* Página /leiloes/imovel — detalhe do imóvel em leilão */

#new-home-root .mgi-site-main.leiloes-imovel-main.nh-main-with-bc {
    padding-top: var(--nh-chrome-offset, calc(var(--nh-header-h) + var(--nh-bc-h) + 0.35rem));
}

@media (min-width: 640px) {
    #new-home-root .mgi-site-main.leiloes-imovel-main.nh-main-with-bc {
        padding-top: var(--nh-chrome-offset-sm, calc(var(--nh-header-h-sm) + var(--nh-bc-h) + 0.5rem));
    }
}

#leiloes-imovel-root {
    --leiloes-imovel-bordor: #71130d;
}

/* Utilitários bordô (complementam root.css) */
#new-home-root #leiloes-imovel-root .background-bordor-soft {
    background-color: rgba(113, 19, 13, 0.2) !important;
}

#new-home-root #leiloes-imovel-root .background-bordor {
    background-color: #71130d !important;
}

#new-home-root #leiloes-imovel-root .text-bordor {
    color: #71130d !important;
}

/* Card de documento — hover bordô */
#new-home-root #leiloes-imovel-root .li-doc-card:hover {
    border-color: #71130d !important;
}

#new-home-root #leiloes-imovel-root .li-doc-card:hover .li-doc-card__icon {
    background-color: #71130d !important;
    color: #ffffff !important;
}

#new-home-root #leiloes-imovel-root .li-doc-card:hover .li-doc-card__title,
#new-home-root #leiloes-imovel-root .li-doc-card:hover .li-doc-card__arrow {
    color: #71130d !important;
}

/* CTA participar */
#new-home-root #leiloes-imovel-root .li-btn-participar {
    box-shadow:
        0 20px 50px rgba(113, 19, 13, 0.25),
        0 4px 12px rgba(113, 19, 13, 0.12);
}

#new-home-root #leiloes-imovel-root .li-btn-participar:hover {
    background-color: #5a0f0a !important;
}

#leiloes-imovel-root .li-description-body p {
    margin-top: 1rem;
}

#leiloes-imovel-root .li-description-body p:first-child {
    margin-top: 0;
}

#leiloes-imovel-root .li-description-body ul,
#leiloes-imovel-root .li-description-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

#leiloes-imovel-root .li-description-body strong {
    font-weight: 700;
    color: #18181b;
}

#leiloes-imovel-root .li-description-body,
#leiloes-imovel-root .li-description-block,
#leiloes-imovel-root .li-description-block h3,
#leiloes-imovel-root .li-description-html {
    text-align: left;
}

#leiloes-imovel-root .li-description-body :where(h1, h2, h3, h4, p, ul, ol, div) {
    text-align: left;
}

    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
}

#leiloes-imovel-root .li-glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

#leiloes-imovel-root .li-hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    #leiloes-imovel-root .li-hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto !important;
    }

    #leiloes-imovel-root .li-hero-grid__main {
        min-height: 16rem;
    }

    #leiloes-imovel-root .li-hero-grid__side {
        min-height: 10rem;
    }
}

#leiloes-imovel-root .li-timeline-dot {
    position: relative;
}

#leiloes-imovel-root .li-timeline-dot::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    width: 2px;
    height: 2.5rem;
    background-color: #e5e7eb;
    transform: translateX(-50%);
}

#leiloes-imovel-root .li-timeline > .relative:last-child .li-timeline-dot::after {
    display: none;
}

#leiloes-imovel-root .li-visit-panel {
    align-self: start;
    width: 100%;
    max-width: 28rem;
}

#leiloes-imovel-root .li-visit-schedule:not(:has([data-li-visit-panel]:not([hidden]))) {
    grid-template-columns: 1fr !important;
}

#leiloes-imovel-root .li-visit-panel.is-unavailable [data-li-visit-instructions],
#leiloes-imovel-root .li-visit-panel.is-unavailable [data-li-visit-open] {
    display: none !important;
}

#leiloes-imovel-root .li-visit-panel.is-unavailable [data-li-visit-disabled] {
    margin-top: 0;
}

#leiloes-imovel-root .li-demo-banner {
    border: 1px dashed #d4d4d8;
    background: #fafafa;
}

/* Galeria — triggers */
#leiloes-imovel-root .li-gallery-trigger {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    text-align: inherit;
}

#leiloes-imovel-root .li-map-iframe {
    display: block;
    filter: saturate(1.05) contrast(1.02);
}

#leiloes-imovel-root .li-gallery-trigger:focus-visible {
    outline: 3px solid #71130d;
    outline-offset: 3px;
}

/* Lightbox */
html.li-lightbox-open {
    overflow: hidden;
}

#leiloes-imovel-root .li-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Espaço lateral para setas + widget de acessibilidade (VLibras). */
    padding: 1rem clamp(5.5rem, 12vw, 8rem);
}

#leiloes-imovel-root .li-lightbox[hidden] {
    display: none !important;
}

#leiloes-imovel-root .li-lightbox.is-open {
    animation: li-lightbox-fade-in 0.2s ease;
}

@keyframes li-lightbox-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#leiloes-imovel-root .li-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

#leiloes-imovel-root .li-lightbox__stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(1200px, 100%);
    max-height: calc(100vh - 2rem);
    margin: 0 auto;
}

#leiloes-imovel-root .li-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 6rem);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    border-radius: 0.5rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    user-select: none;
}

#leiloes-imovel-root .li-lightbox__counter {
    margin: 1rem 0 0;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
}

#leiloes-imovel-root .li-lightbox__close,
#leiloes-imovel-root .li-lightbox__nav {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#leiloes-imovel-root .li-lightbox__close:hover,
#leiloes-imovel-root .li-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

#leiloes-imovel-root .li-lightbox__close:focus-visible,
#leiloes-imovel-root .li-lightbox__nav:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

#leiloes-imovel-root .li-lightbox__close {
    top: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
}

#leiloes-imovel-root .li-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
}

#leiloes-imovel-root .li-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.05);
}

#leiloes-imovel-root .li-lightbox__nav--prev {
    /* Mais próximas do centro da imagem, longe das bordas/VLibras. */
    left: clamp(3.25rem, 9vw, 6.5rem);
}

#leiloes-imovel-root .li-lightbox__nav--next {
    right: clamp(3.25rem, 9vw, 6.5rem);
}

#leiloes-imovel-root .li-lightbox__close .material-symbols-outlined,
#leiloes-imovel-root .li-lightbox__nav .material-symbols-outlined {
    font-size: 1.75rem;
}

@media (max-width: 640px) {
    #leiloes-imovel-root .li-lightbox {
        padding: 0.75rem 0.5rem 3.5rem;
    }

    #leiloes-imovel-root .li-lightbox__image {
        max-height: calc(100vh - 7rem);
        border-radius: 0.375rem;
    }

    #leiloes-imovel-root .li-lightbox__nav {
        top: auto;
        bottom: 0.75rem;
        transform: none;
        width: 2.75rem;
        height: 2.75rem;
    }

    #leiloes-imovel-root .li-lightbox__nav:hover {
        transform: scale(1.05);
    }

    #leiloes-imovel-root .li-lightbox__nav--prev {
        left: calc(50% - 3.25rem);
    }

    #leiloes-imovel-root .li-lightbox__nav--next {
        right: calc(50% - 3.25rem);
        left: auto;
    }

    #leiloes-imovel-root .li-lightbox__close {
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* Cards de estatísticas — hover bordô (root.css #71130d) */
#new-home-root #leiloes-imovel-root .li-stat-card {
    position: relative;
    cursor: default;
    background-color: #ffffff;
    border: 1px solid #f4f4f5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition:
        background-color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease;
}

#new-home-root #leiloes-imovel-root .li-stat-card__icon,
#new-home-root #leiloes-imovel-root .li-stat-card__label,
#new-home-root #leiloes-imovel-root .li-stat-card__value {
    transition: color 0.35s ease;
}

#new-home-root #leiloes-imovel-root .li-stat-card:hover,
#new-home-root #leiloes-imovel-root .li-stat-card:focus-within {
    background-color: #71130d !important;
    border-color: #71130d !important;
    box-shadow:
        0 18px 48px rgba(113, 19, 13, 0.28),
        0 4px 12px rgba(113, 19, 13, 0.16) !important;
    transform: translateY(-4px);
}

#new-home-root #leiloes-imovel-root .li-stat-card:hover .li-stat-card__icon,
#new-home-root #leiloes-imovel-root .li-stat-card:focus-within .li-stat-card__icon,
#new-home-root #leiloes-imovel-root .li-stat-card:hover .li-stat-card__label,
#new-home-root #leiloes-imovel-root .li-stat-card:focus-within .li-stat-card__label,
#new-home-root #leiloes-imovel-root .li-stat-card:hover .li-stat-card__value,
#new-home-root #leiloes-imovel-root .li-stat-card:focus-within .li-stat-card__value {
    color: #ffffff !important;
}

/* Contador — carregamento assíncrono */
#li-countdown.is-loading [data-li-countdown-days],
#li-countdown.is-loading [data-li-countdown-hours],
#li-countdown.is-loading [data-li-countdown-minutes] {
    opacity: 0.45;
}

#li-countdown.is-loading [data-li-countdown-date]:empty {
    display: none;
}

/* Modal — agendamento de visita */
.li-visit-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.li-visit-modal[hidden] {
    display: none !important;
}

.li-visit-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.li-visit-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.li-visit-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #71717a;
    cursor: pointer;
}

body.li-visit-modal-open {
    overflow: hidden;
}

#leiloes-imovel-root .li-interest-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #71130d;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
    transition: color 0.35s ease;
}

#leiloes-imovel-root .li-interest-link:hover,
#leiloes-imovel-root .li-interest-link:focus-visible {
    color: #5a0f0a;
}

/* No hover do card (fundo bordô), o link precisa ficar branco para contraste. */
#new-home-root #leiloes-imovel-root .li-stat-card:hover .li-interest-link,
#new-home-root #leiloes-imovel-root .li-stat-card:focus-within .li-interest-link,
#new-home-root #leiloes-imovel-root .li-stat-card:hover .li-interest-link:hover,
#new-home-root #leiloes-imovel-root .li-stat-card:focus-within .li-interest-link:hover,
#new-home-root #leiloes-imovel-root .li-stat-card:hover .li-interest-link:focus-visible,
#new-home-root #leiloes-imovel-root .li-stat-card:focus-within .li-interest-link:focus-visible {
    color: #ffffff !important;
}

#leiloes-imovel-root .li-interest-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12rem;
    padding: 0.85rem 1.5rem;
    border: 0;
    border-radius: 0.85rem;
    background: #71130d;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

#leiloes-imovel-root .li-interest-cta:hover {
    opacity: 0.92;
}

#leiloes-imovel-root .li-interest-cta:active {
    transform: scale(0.98);
}

.leiloes-interest-modal {
    border: 0;
    padding: 0;
    max-width: 28rem;
    width: calc(100vw - 2rem);
    border-radius: 1rem;
    background: transparent;
    color: #1a1c1c;
}
.leiloes-interest-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}
.leiloes-interest-modal__panel {
    margin: 0;
    padding: 1.25rem 1.35rem 1.35rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}
.leiloes-interest-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.leiloes-interest-modal__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.leiloes-interest-modal__close {
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 0.15rem;
    line-height: 0;
}
.leiloes-interest-modal__lead {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.45;
}
.leiloes-interest-modal__property {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1c1c;
}
.leiloes-interest-modal__fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.1rem;
}
.leiloes-interest-modal__label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}
.leiloes-interest-modal__optional {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}
.leiloes-interest-modal__input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1c1c;
    text-transform: none;
    letter-spacing: 0;
}
.leiloes-interest-modal__input:focus {
    outline: 2px solid rgba(113, 19, 13, 0.25);
    border-color: #71130d;
}
.leiloes-interest-modal__check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
.leiloes-interest-modal__feedback {
    margin: 0.85rem 0 0;
    font-size: 0.875rem;
    line-height: 1.4;
}
.leiloes-interest-modal__feedback.is-error { color: #b91c1c; }
.leiloes-interest-modal__feedback.is-ok { color: #166534; }
.leiloes-interest-modal__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 1.15rem;
}
.leiloes-interest-modal__btn {
    border: 0;
    border-radius: 0.55rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}
.leiloes-interest-modal__btn--ghost {
    background: #f1f5f9;
    color: #334155;
}
.leiloes-interest-modal__btn--primary {
    background: #71130d;
    color: #fff;
}
.leiloes-interest-modal__btn--primary:disabled {
    opacity: 0.65;
    cursor: wait;
}
