/* ============================================================
   style.css — Manchester 3D Map
   Premium dark-mode + glassmorphism aesthetic
   ============================================================ */

/* ── Reset ────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #f8fafc;
    background-color: #0f1117;
    overflow: hidden;
}

/* ── Map fill ────────────────────────────────────────────── */
#map {
    position: absolute;
    inset: 0;
}

/* ── Panel ───────────────────────────────────────────────── */
.panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: rgba(17, 20, 28, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: -6px 0 32px rgba(0, 0, 0, 0.6);
    transform: translateX(100%);
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.panel.open {
    transform: translateX(0);
}

/* ── Close button ────────────────────────────────────────── */
.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: #cbd5e1;
    font-size: 22px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 1;
}
.close-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* ── Scrollable content area ─────────────────────────────── */
.panel-content {
    padding: 64px 26px 32px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* scrollbar */
.panel-content::-webkit-scrollbar { width: 4px; }
.panel-content::-webkit-scrollbar-track { background: transparent; }
.panel-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* ── Typography ──────────────────────────────────────────── */
h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.3;
}

.location {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 400;
    margin-top: -10px;
}

/* ── Price + Rating row ──────────────────────────────────── */
.price-rating-row {
    display: flex;
    gap: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 18px;
}

.price-block, .rating-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.price-display {
    font-size: 1.35rem;
    font-weight: 700;
    color: #34d399;
    line-height: 1;
}

.price-amount { color: #34d399; }
.price-unit   { font-size: 0.82rem; font-weight: 500; color: #6ee7b7; margin-left: 2px; }
.price-na     { font-size: 0.88rem; color: #64748b; font-style: italic; }

.rating-display {
    font-size: 1rem;
    color: #fbbf24;
    line-height: 1.2;
}

.rating-num   { color: #f8fafc; font-size: 0.88rem; font-weight: 600; }
.no-rating    { color: #475569; font-size: 0.82rem; font-style: italic; }
.review-count { font-size: 0.74rem; color: #64748b; }

/* ── Generic info section ────────────────────────────────── */
.info-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
}

.section-sub {
    font-size: 0.78rem;
    color: #64748b;
}

/* University badge */
.badge {
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* ── Property detail list ────────────────────────────────── */
.detail-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.detail-label { color: #64748b; }
.detail-value { color: #e2e8f0; font-weight: 600; }

/* ── Amenity list ────────────────────────────────────────── */
.amenity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.amenity-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.84rem;
    color: #cbd5e1;
}

.amenity-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

/* ── CTA button ──────────────────────────────────────────── */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 12px;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
    margin-top: 4px;
}

.cta-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(59, 130, 246, 0.5);
}

/* ── Loading animation ───────────────────────────────────── */
.loading {
    font-size: 0.82rem;
    color: #60a5fa;
    font-style: italic;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 1;   }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .panel { width: 100%; border-left: none; }
    h2     { font-size: 1.25rem; }
}
