﻿/* assets/css/sheet.css — SareProperty | Phase 2 split */
/* ============================================================
   PROPERTY ACCORDIONS & AD BANNER
   ============================================================ */
.property-accordions {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
    border-top: 1px solid #e0f2fe;
    border-bottom: 1px solid #e0f2fe;
    padding: 10px 0;
}

.accordion-item {
    background: #fff;
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
    background: #fff;
}

.acc-title-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.acc-icon {
    width: 44px;
    height: 44px;
    background: #e0f2fe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    font-size: 1.4rem;
}

.acc-title-left span {
    font-size: 1.15rem;
    font-weight: 500;
    color: #111;
}

.acc-chevron {
    font-size: 1.4rem;
    color: #888;
    transition: transform 0.3s ease;
}

.accordion-item.active .acc-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 0 16px 0;
    display: none;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}

.accordion-item.active .accordion-content {
    display: block;
}

/* Detail Table Rows (Key-Value pairs inside accordions) */
.detail-table {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 4px 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .detail-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #222;
}

.detail-row .detail-value {
    font-size: 0.9rem;
    font-weight: 400;
    color: #888;
    text-align: right;
}


.ad-banner-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* ============================================================
   PROPERTY MAIN CARD & HIGHLIGHTS
   ============================================================ */
.prop-main-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.key-highlights-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hl-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hl-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
}

.hl-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #5eead4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d9488;
    background: transparent;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* -- MOBILE: Up to 480px -- */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
        box-shadow: none;
    }

    .app-header {
        padding: 14px 16px 8px 16px;
        gap: 8px;
    }

    .brand-bold, .brand-light {
        font-size: 1.3rem;
    }

    .header-search {
        max-width: none;
        padding: 7px 12px;
    }

    .header-search input {
        font-size: 0.8rem;
    }

    .location-top {
        font-size: 1.05rem;
    }

    .location-address {
        max-width: 160px;
        font-size: 0.75rem;
    }

    .profile-icon {
        width: 38px;
        height: 38px;
    }

    .hero-slider {
        padding: 0 12px;
    }

    .slide-content {
        height: 180px;
        border-radius: 14px;
    }

    .slide-overlay h2 {
        font-size: 1.2rem;
    }

    .slide-overlay p {
        font-size: 0.8rem;
    }

    .categories-section {
        padding: 8px 12px 16px 12px;
    }

    .section-heading h2 {
        font-size: 1.15rem;
    }

    .categories-grid {
        gap: 8px;
    }

    .cat-card {
        height: 120px;
        padding: 14px;
        border-radius: 14px;
    }

    .cat-text {
        font-size: 0.85rem;
    }

    .cat-card img {
        width: 50%;
        max-height: 60%;
    }

    .filter-row {
        padding: 0 12px;
        gap: 6px;
    }

    .filter-btn, .sort-dropdown .sort-btn, .apply-fast-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .property-list-card {
        margin: 10px 12px;
        border-radius: 14px;
    }

    .prop-info {
        padding: 12px;
    }

    .prop-title {
        font-size: 1rem;
    }

    .prop-meta {
        font-size: 0.75rem;
    }

    .bottom-nav {
        padding: 10px 8px 16px 8px;
        border-radius: 20px 20px 0 0;
    }

    .nav-item span {
        font-size: 0.65rem;
    }

    .nav-item i {
        font-size: 1.2rem;
    }

    .nav-padding {
        height: 70px;
    }

    .prop-main-card {
        padding: 12px;
    }

    .sheet-title {
        font-size: 1.1rem;
    }

    .detail-row {
        padding: 11px 0;
    }

    .detail-row .detail-label,
    .detail-row .detail-value {
        font-size: 0.8rem;
    }

    .acc-icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .acc-title-left span {
        font-size: 1rem;
    }

    .highlights-grid {
        gap: 8px;
    }

    .hl-item {
        padding: 8px 10px;
    }

    .hl-item span {
        font-size: 0.75rem;
    }

    .ad-banner-container {
        padding: 8px;
    }
}

/* -- TABLET: 481px to 768px -- */
@media (min-width: 481px) and (max-width: 768px) {
    .app-container {
        max-width: 100%;
    }

    .app-header {
        padding: 16px 20px 10px 20px;
    }

    .header-search {
        max-width: 280px;
    }

    .slide-content {
        height: 240px;
    }

    .categories-grid {
        gap: 14px;
    }

    .cat-card {
        height: 140px;
    }

    .property-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 16px;
    }

    .property-list-card {
        margin: 0;
        border: 1px solid #eee;
        border-radius: 14px;
    }

    .sheet-right-col {
        max-height: none;
    }
}

/* -- DESKTOP: 769px and up -- */
@media (min-width: 769px) {
    .app-container {
        max-width: 100%;
    }

    .app-header {
        padding: 20px 40px 12px 40px;
    }

    .brand-bold, .brand-light {
        font-size: 1.8rem;
    }

    .header-search {
        max-width: 420px;
    }

    .location-top {
        font-size: 1.3rem;
    }

    .location-address {
        max-width: 300px;
    }

    .profile-icon {
        width: 48px;
        height: 48px;
    }

    .slide-content {
        height: 320px;
    }

    .slide-overlay h2 {
        font-size: 2rem;
    }

    .categories-section {
        padding: 15px 25px 25px 25px;
    }

    .section-heading h2 {
        font-size: 1.6rem;
    }

    .cat-card {
        height: 160px;
        padding: 22px;
    }

    .cat-text {
        font-size: 1.15rem;
    }

    .filter-row {
        padding: 0 25px;
    }

    .property-list {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
        padding: 20px 25px;
    }

    .property-list-card {
        margin: 0;
        border: 1px solid #eee;
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    }

    .property-list-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    }

    .bottom-nav {
        max-width: 1200px;
        border-radius: 25px 25px 0 0;
    }

    .nav-item span {
        font-size: 0.8rem;
    }

    .nav-item i {
        font-size: 1.5rem;
    }

    .sheet-body {
        max-width: 1200px;
     background: var(--bg-secondary);}

    .detail-row .detail-label,
    .detail-row .detail-value {
        font-size: 0.95rem;
    }

    .acc-title-left span {
        font-size: 1.2rem;
    }

    .highlights-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* -- LARGE DESKTOP: 1200px and up -- */
@media (min-width: 1200px) {
    .app-container {
        border-left: 1px solid #f0f0f0;
        border-right: 1px solid #f0f0f0;
    }

    .property-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .slide-content {
        height: 380px;
    }
}


/* Embed Mode (for broker iframe) */
body.embed-mode {
    background: transparent !important;
    overflow: hidden !important;
}
body.embed-mode > *:not(#property-sheet-overlay):not(#property-bottom-sheet) {
    display: none !important;
}
body.embed-mode #property-sheet-overlay {
    display: none !important; /* Hide overlay background since iframe has its own */
}
body.embed-mode #property-bottom-sheet {
    display: flex !important;
    position: static !important;
    width: 100% !important;
    height: 100vh !important;
    background: #f8fafc !important;
    z-index: 1 !important;
    transform: none !important;
    border-radius: 0 !important;
    max-height: 100vh !important;
}
body.embed-mode #property-bottom-sheet .sheet-header .sheet-back-btn {
    display: none !important; /* Broker app has its own close button */
}

/* ============================================================