/*
 * Property show page layout (title bar, characteristics, contact card, map).
 * Image carousel: public/css/libraries/carousel-lightbox.css.
 * Colors: see frontend-theme.css.
 */

/* -------------------------------------------------------------------------
 * Title bar (title + ID/location meta + price)
 * ------------------------------------------------------------------------- */

.public-property-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: var(--color-text);
}

.public-property-title-meta {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.public-property-header-price {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--color-price);
    white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------------- */

.public-property-gallery-card,
.public-property-body .card {
    border-radius: 16px;
}

/* Empty gallery — same footprint as the carousel hero, no controls. */
.property-media-placeholder {
    aspect-ratio: 16 / 10;
    max-height: min(72vh, 640px);
    width: 100%;
}

.property-media-placeholder__icon {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1;
    opacity: 0.55;
}

/* -------------------------------------------------------------------------
 * Description (collapsed preview + read more)
 * ------------------------------------------------------------------------- */

.public-property-description--collapsed {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
}

.public-property-description-toggle {
    color: var(--color-brand);
    font-weight: 600;
    text-decoration: none;
}

.public-property-description-toggle:hover,
.public-property-description-toggle:focus {
    color: var(--color-brand-dark);
    text-decoration: underline;
}

@media print {
    .public-property-description--collapsed {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .public-property-description-toggle {
        display: none !important;
    }
}

/* -------------------------------------------------------------------------
 * Characteristics (striped label/value rows, two columns on md+)
 * ------------------------------------------------------------------------- */

.public-property-characteristics__row {
    padding: 0.55rem 0.9rem;
    border-radius: 6px;
    font-size: 0.925rem;
}

/* Stripe row pairs: with 2 columns, items 1-2 form the first visual row. */
.public-property-characteristics > .col:nth-child(4n + 1) .public-property-characteristics__row,
.public-property-characteristics > .col:nth-child(4n + 2) .public-property-characteristics__row {
    background-color: var(--color-surface-muted);
}

@media (max-width: 767.98px) {
    /* Single column: stripe every other row instead of pairs. */
    .public-property-characteristics > .col:nth-child(4n + 2) .public-property-characteristics__row {
        background-color: transparent;
    }

    .public-property-characteristics > .col:nth-child(2n + 1) .public-property-characteristics__row {
        background-color: var(--color-surface-muted);
    }
}

/* -------------------------------------------------------------------------
 * Specifications (amenity check list)
 * ------------------------------------------------------------------------- */

.public-property-amenity {
    line-height: 1.4;
}

.public-property-amenity__check {
    font-size: 1.1rem;
    color: var(--color-text-subtle);
}

/* -------------------------------------------------------------------------
 * Map
 * ------------------------------------------------------------------------- */

.public-property-map {
    position: relative;
    width: 100%;
    z-index: 0;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

.public-property-map-iframe {
    display: block;
    width: 100%;
    height: 300px;
    min-height: 220px;
    max-width: 100%;
}

/* -------------------------------------------------------------------------
 * Contact card (agent + inquiry form)
 * ------------------------------------------------------------------------- */

.public-property-sidebar .public-contact-card {
    position: sticky;
    top: 1.25rem;
}

.public-contact-card .card-body {
    padding: 1.5rem;
}

.frontend-page .public-contact-card__avatar {
    flex: 0 0 auto;
    width: 4rem;
    height: 4rem;
    border-radius: 50% !important;
}

.frontend-page .public-contact-card__photo {
    object-fit: cover;
    background: var(--color-surface-muted, #f1f5f9);
}

.frontend-page .public-contact-card__initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-brand);
    color: var(--color-text-on-brand);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    user-select: none;
}

.public-contact-card__phone {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-text-on-brand);
    font-weight: 600;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.public-contact-card__phone:hover,
.public-contact-card__phone:focus {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: var(--color-text-on-brand);
}

.public-contact-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--color-brand);
    line-height: 1.6;
}

.public-contact-card__submit {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
    color: var(--color-text-on-brand);
    font-weight: 600;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.public-contact-card__submit:hover,
.public-contact-card__submit:focus {
    background-color: var(--color-brand-dark);
    border-color: var(--color-brand-dark);
    color: var(--color-text-on-brand);
}
