/* Custom CSS for Apartments App */

/* Custom card text styling for rich content */
.card-text p,
.card-text ul,
.card-text ol {
    margin-bottom: 0.5rem;
}

/* Description content styling with brand accent */
.description-content {
    background-color: var(--brand-light-gray);
    border-left: 4px solid var(--brand-yellow);
    padding: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
    border-radius: 8px;
}

/* Hover effect for apartment cards */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

/* Object fit utility for images */
.object-fit-cover {
    object-fit: cover;
}

/* CTA Banner and Smart Matches Styles */
.map-shell{position:relative;border:2px solid #ffcc00;border-radius:16px;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,0.08);}
.sticky-map{position:sticky;top:88px;height:calc(100vh - 120px);}
#map{width:100%;height:100%;border-radius:16px;}
.filter-chip{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;border:1px solid #e5e5e5;background:#fff;cursor:pointer;transition:all 0.2s ease;box-shadow:0 4px 10px rgba(0,0,0,0.04);}
.filter-chip:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(0,0,0,0.08);}
.filter-bar {
    background: #fff;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 72px; /* Adjust based on navbar height */
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.filter-dropdown .dropdown-toggle {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.filter-dropdown .dropdown-toggle:after {
    margin-left: 10px;
}
.filter-dropdown .dropdown-toggle:hover {
    border-color: #000;
    background: #f8f9fa;
}
.filter-dropdown .dropdown-menu {
    min-width: 280px;
    padding: 1.5rem;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 16px;
    margin-top: 10px;
}
.filter-active-indicator {
    width: 8px;
    height: 8px;
    background: #ffcc00;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}
.filter-popover{position:fixed;top:20%;left:50%;transform:translate(-50%,-20%);width:min(420px,90%);background:#fff;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,0.2);z-index:1050;display:none;max-height:80vh;overflow-y:auto;}
.filter-popover.active{display:block;}
.popover-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,0.4);z-index:1040;display:none;}
.popover-backdrop.active{display:block;}
.rental-card{border:none;border-radius:12px;overflow:hidden;transition:transform 0.2s,box-shadow 0.2s;background:#fff;}
.rental-card:hover{transform:translateY(-4px);box-shadow:0 12px 24px rgba(0,0,0,0.15);}
.rental-image-container{position:relative;height:200px;overflow:hidden;background:#f0f0f0;}
.rental-price-badge{position:absolute;bottom:12px;left:12px;background:rgba(0,0,0,0.85);color:#fff;padding:6px 14px;border-radius:20px;font-weight:700;font-size:1rem;backdrop-filter:blur(8px);}
.image-count-badge{position:absolute;bottom:12px;right:12px;background:rgba(0,0,0,0.7);color:#fff;padding:4px 10px;border-radius:8px;font-size:0.85rem;font-weight:600;}
.carousel-control-prev,.carousel-control-next{width:40px;}
.carousel-control-prev-icon,.carousel-control-next-icon{background-color:rgba(0,0,0,0.5);border-radius:50%;padding:10px;}
/* Modern Light CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #ffffff 0%, #fffbe6 100%);
    border: 1px solid #dcdde1;
    border-radius: 20px;
    padding: 48px 40px;
    color: #1a1a1a;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 204, 0, 0.15), transparent 60%);
    pointer-events: none;
}

.cta-banner h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: #000;
    text-align: center;
}

.cta-banner p {
    font-size: 1.15rem;
    color: #555;
    max-width: 650px;
    margin: 0 auto 32px;
    line-height: 1.6;
    text-align: center;
}

/* Fix for the "Sign In" button visibility in light mode */
.cta-banner .btn-outline-light {
    color: #1a1a1a;
    border-color: #1a1a1a;
}
.cta-banner .btn-outline-light:hover {
    background-color: #1a1a1a;
    color: #fff;
}

.smart-matches-section{background:#f8f9fa;border-radius:20px;padding:32px 0;margin-bottom:32px;}

/* Styled Dismiss Button */
.cta-banner .btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0.8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0.8rem;
    background-size: 10px;
    transition: all 0.2s ease;
}

.cta-banner .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Apartment Overview Styles */
.carousel-item img {
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
}
.sticky-sidebar {
    position: sticky;
    top: 90px;
}
.amenity-badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}
/* Neighborhood Scores */
.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    background: var(--brand-yellow);
    color: var(--brand-black);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.5rem;
}
.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
}
.score-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}
.score-desc {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-black);
}
/* School Ratings */
.school-rating {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}
.rating-high { background-color: #00a651; }
.rating-mid { background-color: #ffc107; color: #212529; }
.rating-low { background-color: #ff4d4d; }

/* Map Styling */
#map {
    height: 400px;
    width: 100%;
    border-radius: 12px;
}
.map-marker {
    cursor: pointer;
}

/* Travel Times Styling */
.travel-times-container {
    background: #fff;
    border-radius: 12px;
}
.transport-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.transport-btn {
    flex: 1;
    border: 1px solid #dee2e6;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s;
}
.transport-btn.active {
    background: var(--brand-black);
    color: #fff;
    border-color: var(--brand-black);
}
.destination-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: transform 0.2s;
}
.destination-item:hover {
    transform: translateX(4px);
}
.dest-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--brand-black);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.dest-info {
    flex-grow: 1;
}
.dest-time {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--brand-black);
}
.remove-dest {
    color: #ced4da;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}
.remove-dest:hover {
    color: #dc3545;
}

/* Mapbox Search Override */
mapbox-address-autofill {
    width: 100%;
}
.search-input-group {
    position: relative;
}
.search-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    z-index: 10;
}
#destination-search {
    padding-left: 45px;
    border-radius: 10px;
    height: 50px;
    border: 2px solid #f1f3f5;
    transition: border-color 0.2s;
}
#destination-search:focus {
    border-color: var(--brand-yellow);
    box-shadow: none;
}

/* Broker Contact Card Styles */
.broker-contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
    position: relative;
    text-decoration: none !important;
    overflow: hidden;
    container-type: inline-size; /* Enable container queries */
}

.broker-contact-row:hover {
    background-color: #f8f9fa;
}

.broker-contact-text {
    /* Scale font size based on container width to avoid truncation */
    font-size: clamp(0.75rem, 6cqw, 0.95rem); 
    color: #212529;
    font-weight: 500;
    white-space: nowrap;
    /* Removed text-overflow: ellipsis and overflow: hidden to prefer shrinking */
    flex: 1;
    text-align: left; /* Override parent text-center */
}

.broker-contact-text .fw-bold {
    display: inline-block;
    min-width: 50px; /* Ensure values align vertically */
}

.broker-copy-btn {
    opacity: 1; /* Fully visible as requested */
    transition: background-color 0.2s;
    color: #6c757d; /* Muted text color by default */
    background: none;
    border: none;
    padding: 4px 8px; /* Slightly more padding for touch/click target */
    border-radius: 4px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-left: auto; /* Push to right if in flex container, though we use gap now */
}

.broker-copy-btn:hover {
    background-color: #e9ecef;
    color: #0d6efd; /* Brand or Primary color on hover */
}
