/**
 * Panel Styles
 * Building List Panel and Info Panel (side-by-side layout)
 * Building list on left, info panel on right
 */

/* =================================================================
   BUILDING LIST PANEL
   Replaces main menu when a category is selected
   ================================================================= */

.building-list-panel,
.parking-list-panel,
.accessible-entrances-panel,
.accessible-parking-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-y: auto;
    min-height: 100%;
    padding-bottom: 1.5rem;
}

.building-list-panel,
.parking-list-panel,
.accessible-entrances-panel {
    background-color: #f2f2f3;
}

.accessible-parking-panel {
    background-color: #ffffff;
}

.building-list-panel[hidden],
.parking-list-panel[hidden],
.accessible-entrances-panel[hidden],
.accessible-parking-panel[hidden] {
    display: none;
}

/* =================================================================
   PANEL HEADER
   ================================================================= */

.building-panel-header {
    padding: 0.65rem 1.5rem 0.75rem;
    border-bottom: none;
    background-color: transparent;
}

.panel-back-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 1.5rem 0;
    gap: 0.5rem;
}

.building-panel-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.building-panel-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #757575;
    cursor: pointer;
    transition: all 150ms ease;
}

.building-panel-close:hover {
    background-color: #eeeeee;
    color: #212121;
}

.building-panel-close:focus-visible {
    outline: 3px solid #1a5632;
    outline-offset: 2px;
}

.building-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.building-panel-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
}

.building-panel-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5b70;
}

.building-panel-hint {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    color: #000000;
}

.panel-list-toggle {
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    font-size: 0.95rem;
    gap: 0.45rem;
    flex-shrink: 0;
}

.panel-list-toggle .category-toggle-icon {
    width: 32px;
    height: 32px;
}

/* =================================================================
   BUILDING LIST ITEMS
   ================================================================= */

.building-list-items,
.parking-list-items {
    flex: none;
    overflow: visible;
    list-style: none;
    padding: 0.75rem 1.4rem 1.25rem;
    margin: 0;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.building-list-item,
.parking-list-item {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    padding: 0.45rem 1.2rem;
    background-color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 1.2rem;
    text-align: left;
    font-size: 0.95rem;
    color: #0f172a;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 48px;
    line-height: 1.35;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    letter-spacing: -0.01em;
}

.building-list-item__label,
.parking-list-item__label {
    flex: 1;
}

.building-list-item__chevron,
.parking-list-item__chevron {
    flex-shrink: 0;
    font-size: 0.95rem;
    color: #64748b;
    transition: color var(--transition-fast);
}

.building-list-item:hover,
.parking-list-item:hover {
    border-color: #1a5632;
    box-shadow: 0 16px 32px rgba(26, 86, 50, 0.12);
}

.building-list-item:hover .building-list-item__chevron,
.parking-list-item:hover .parking-list-item__chevron {
    color: #ffffff;
}

.building-list-item:focus-visible,
.parking-list-item:focus-visible {
    outline: 3px solid #1a5632;
    outline-offset: 2px;
}

.building-list-item.is-selected,
.parking-list-item.is-selected {
    background-color: #e8f7ed;
    border-color: #1a5632;
    color: #0f2b1f;
    box-shadow: 0 18px 36px rgba(26, 86, 50, 0.18);
    font-weight: 600;
}

.building-list-item.is-selected .building-list-item__chevron,
.parking-list-item.is-selected .parking-list-item__chevron {
    color: #1a5632;
}

.building-list-empty,
.parking-list-empty {
    padding: 1.5rem;
    text-align: center;
    color: #757575;
    font-style: italic;
}

/* =================================================================
   INFO PANEL
   Desktop: floating card adjacent to sidebar
   Mobile: fixed bottom sheet with peek/expand states
   ================================================================= */

.info-panel {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: min(430px, calc(100% - 3rem));
    max-height: calc(100% - 3rem);
    background: linear-gradient(180deg, #f7f9fb 0%, #ffffff 40%);
    border-radius: 24px;
    border: 1px solid rgba(99, 114, 130, 0.12);
    box-shadow: 0 35px 70px rgba(15, 23, 42, 0.18);
    z-index: var(--z-popover);
    display: none;
    flex-direction: column;
    overflow-y: auto;
    transition: height var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.info-panel.is-open {
    display: flex;
}

/* Handle pill — hidden on desktop, shown on mobile as expand/collapse trigger */
.info-panel-handle {
    display: none;
    background: transparent;
    border: none;
    padding: 0.35rem 0;
    width: 100%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 0.45rem;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-panel-handle:focus-visible {
    outline: 2px solid #1a5632;
    outline-offset: 4px;
}

.info-panel-handle .handle-pill {
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background-color: rgba(148, 163, 184, 0.8);
}

.info-panel-handle .peek-label {
    font-size: 0.78rem;
}

/* Info Panel Body */
.info-panel-body {
    flex: 1;
    overflow-y: visible;
    padding: 0 1.75rem 1.75rem;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    min-height: 0;
}

.info-panel-close-icon {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    z-index: 2;
}

.info-panel-close-icon img {
    width: 18px;
    height: 18px;
}

.info-panel-close-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.info-panel .panel-back-nav {
    padding: 1.5rem 1.75rem 0;
    background: transparent;
}

.info-panel .panel-back-btn {
    background: none;
    border: none;
    color: #1a5632;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0;
    min-height: auto;
    margin-bottom: 10px;
}

.info-panel .panel-back-btn:hover,
.info-panel .panel-back-btn:focus-visible {
    background: none;
    text-decoration: underline;
    outline: none;
}

/* =================================================================
   INFO SECTIONS
   ================================================================= */

.info-section {
    margin: 0;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212121;
    margin: 0 0 0.5rem 0;
}

.info-section h3 a {
    color: #1a5632;
    text-decoration: none;
}

.info-section h3 a:hover {
    color: #0a6e2f;
    text-decoration: underline;
}

.info-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
}

.info-section p {
    margin: 0;
    color: #212121;
    line-height: 1.75;
}

.info-section div {
    color: #212121;
    line-height: 1.5;
}

/* Building Name */
#name-section {
    padding: 0;
    margin: 0;
}

#address-section {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 1rem;
    background: #ffffff;
    padding: 1rem 1.25rem;
}

.address-block {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    position: relative;
}

.address-lines p {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
    line-height: 1.35;
}

.address-lines p + p {
    margin-top: 0.15rem;
    color: #0f172a;
}

.address-copy-btn {
    border: 1px solid rgba(26, 86, 50, 0.15);
    border-radius: 999px;
    background: rgba(26, 86, 50, 0.05);
    color: #1a5632;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: border-color var(--transition-fast, 150ms ease), background-color var(--transition-fast, 150ms ease);
}

.address-copy-btn img {
    width: 16px;
    height: 16px;
}

.address-copy-btn:hover,
.address-copy-btn:focus-visible {
    border-color: rgba(26, 86, 50, 0.45);
    background: rgba(26, 86, 50, 0.12);
}

.address-copy-btn:focus-visible {
    outline: 3px solid rgba(26, 86, 50, 0.35);
    outline-offset: 2px;
}

.address-copy-btn.is-copied {
    border-color: rgba(26, 86, 50, 0.45);
    background: rgba(26, 86, 50, 0.18);
}

.address-copy-feedback {
    position: relative;
    right: 0.2rem;
    font-size: 0.75rem;
    color: #0f5132;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
}

.address-copy-feedback.is-visible {
    opacity: 1;
}

#actions-section,
#addl-info-section,
#also-here-section,
#accessible-section {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 1rem;
    background: #ffffff;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

#actions-section {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.building-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.building-name a {
    color: #1a5632;
    text-decoration: none;
}

.building-name a:hover {
    color: #0a6e2f;
    text-decoration: underline;
}

/* =================================================================
   STREETVIEW / POI IMAGE
   ================================================================= */

.streetview-section {
    margin: 0;
    padding: 0;
    border: none;
    overflow: hidden;
    border-radius: 24px 24px 12px 12px;
    background: #dfe7ee;
    flex-shrink: 0;
}

.streetview-section.has-image {
    margin-bottom: 0;
}

.streetview-embed {
    width: 100%;
    background-color: #eeeeee;
}

.streetview-embed[hidden] {
    display: none;
}

.poi-image {
    width: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    flex-shrink: 0;
}

#streetview-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

#streetview-toggle[hidden] {
    display: none;
}

/* =================================================================
   ACTION BUTTONS (legacy info-btn — kept for compatibility)
   ================================================================= */

.info-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.info-btn {
    padding: 0.5rem 1rem;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #212121;
    cursor: pointer;
    transition: all 150ms ease;
}

.info-btn:hover {
    background-color: #eeeeee;
    border-color: #bdbdbd;
}

.info-btn:focus-visible {
    outline: 3px solid #1a5632;
    outline-offset: 2px;
}

.info-btn-primary {
    background-color: #1a5632;
    border-color: #1a5632;
    color: #ffffff;
}

.info-btn-primary:hover {
    background-color: #0a6e2f;
    border-color: #0a6e2f;
}

.info-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #212121;
    background-color: #ffffff;
    margin-top: 0.5rem;
}

/* =================================================================
   PANEL BACK NAVIGATION
   ================================================================= */

.panel-back-nav {
    display: flex;
    align-items: center;
    padding: 0.4rem 1.5rem;
    background: transparent;
    border-bottom: none;
    flex-shrink: 0;
}

.panel-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(26, 86, 50, 0.1);
    border: none;
    color: #1a5632;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    min-height: 36px;
    line-height: 1;
    transition: background 150ms, color 150ms;
}

.panel-back-btn:hover,
.panel-back-btn:focus-visible {
    background: rgba(26, 86, 50, 0.2);
    color: #0f5132;
    outline: none;
}

.panel-back-nav--link {
    padding: 0.4rem 0 0.25rem;
    border-bottom: none;
    margin-bottom: 0.15rem;
}

.panel-back-nav--link .panel-back-btn {
    background: transparent;
    padding: 0.1rem 0;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a5632;
    min-height: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.panel-back-nav--link .panel-back-btn i {
    font-size: 1em;
}

.panel-back-nav--link .panel-back-icon {
    display: inline-flex;
    align-items: center;
}

.panel-back-nav--link .panel-back-text {
    line-height: 1.2;
}

.panel-back-nav--link .panel-back-btn:hover,
.panel-back-nav--link .panel-back-btn:focus-visible {
    background: transparent;
    color: #0f5132;
    text-decoration: underline;
}

/* =================================================================
   ALSO HERE
   ================================================================= */

.also-here-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.also-here-list li {
    margin: 0;
}

.also-here-link {
    background: none;
    border: none;
    padding: 0.125rem 0;
    min-height: 28px;
    color: #1a5632;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    justify-content: flex-start;
    display: flex;
    align-items: center;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 2px;
    width: 100%;
}

.also-here-link:hover,
.also-here-link:focus-visible {
    color: #0a6e2f;
    outline: 2px solid #0a6e2f;
    outline-offset: 2px;
    border-radius: 2px;
}

.also-here-tag {
    font-size: 1rem;
    color: #616161;
    padding: 0.125rem 0;
    min-height: 1.4rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

#also-here-section.no-bottom-border {
    border-bottom: none;
}

.also-here-pin-icon {
    width: 0.75em;
    height: 0.75em;
    fill: currentColor;
    flex-shrink: 0;
    margin-left: 0.4em;
    position: relative;
    top: -0.05em;
}

/* =================================================================
   QUICK ACTION BUTTONS (Directions / Street View)
   ================================================================= */

.info-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0;
    margin-top: 0.4rem;
}

.info-quick-actions[hidden] {
    display: none;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 48px;
    width: 100%;
    padding: 0.85rem 1.2rem;
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition:
        background-color var(--transition-fast, 150ms ease),
        color var(--transition-fast, 150ms ease),
        border-color var(--transition-fast, 150ms ease),
        box-shadow var(--transition-fast, 150ms ease);
}

.quick-action-btn[hidden] {
    display: none;
}

.quick-action-btn:hover {
    background-color: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.4);
    color: #0f172a;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.quick-action-btn:focus-visible {
    outline: var(--focus-ring-width, 3px) solid var(--color-focus, #1a5632);
    outline-offset: var(--focus-ring-offset, 2px);
}

.quick-action-btn[aria-expanded="true"],
.quick-action-btn.is-copied {
    background-color: var(--color-uab-green, #1a5632);
    border-color: var(--color-uab-green, #1a5632);
    color: #ffffff;
}

.quick-action-btn.is-copied {
    pointer-events: none;
}

.quick-action-btn svg,
.quick-action-btn img {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.quick-action-btn--primary,
.quick-action-btn.primary-action {
    background-color: var(--color-uab-green, #1a5632);
    border-color: var(--color-uab-green, #1a5632);
    color: #ffffff;
}

.quick-action-btn--primary:hover,
.quick-action-btn--primary:focus-visible,
.quick-action-btn--primary[aria-expanded="true"],
.quick-action-btn.primary-action:hover,
.quick-action-btn.primary-action:focus-visible {
    background-color: #ffffff;
    border-color: var(--color-uab-green, #1a5632);
    color: var(--color-uab-green, #1a5632);
    box-shadow: 0 18px 32px rgba(26, 86, 50, 0.25);
    text-decoration: none;
}

.quick-action-btn--secondary {
    background-color: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
    box-shadow: none;
}

.quick-action-btn--secondary:hover,
.quick-action-btn--secondary:focus-visible {
    background-color: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.35);
}

.quick-action-label {
    font-size: 0.95rem;
}

.inline-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1.2rem;
    border: 1px solid rgba(26, 86, 50, 0.45);
    border-radius: 999px;
    background-color: transparent;
    color: #1a5632;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast, 150ms ease), color var(--transition-fast, 150ms ease);
    width: 100%;
    justify-content: center;
}

.inline-action-btn:hover,
.inline-action-btn:focus-visible {
    background-color: rgba(26, 86, 50, 0.08);
    color: #0f5132;
}

.inline-action-btn:focus-visible {
    outline: var(--focus-ring-width, 3px) solid var(--color-focus, #1a5632);
    outline-offset: 2px;
}

.info-quick-actions .inline-action-btn {
    margin: 0;
}

.inline-action-btn[hidden] {
    display: none;
}

.inline-action-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inline-action-btn__icon img {
    width: 14px;
    height: 14px;
}

/* =================================================================
   PANEL FOOTER CLOSE BUTTON
   ================================================================= */

.panel-footer {
    padding: 1rem 1.2rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    text-align: center;
    flex-shrink: 0;
}

.panel-footer-close {
    width: 100%;
    padding: 0.625rem 1rem;
    background-color: var(--color-white, #fff);
    color: var(--color-dark-green, #1a5632);
    border: 2px solid var(--color-dark-green, #1a5632);
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.panel-footer-close:hover,
.panel-footer-close:focus {
    background-color: var(--color-dark-green, #1a5632);
    color: var(--color-white, #fff);
    outline: 3px solid var(--focus-color, #005fcc);
    outline-offset: 2px;
}

/* =================================================================
   ACCESSIBLE ENTRANCE STYLES
   ================================================================= */

.accessible-entrance-entry {
    margin-bottom: 0.75rem;
}

.accessible-entrance-entry:last-child {
    margin-bottom: 0;
}

.entrance-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.25rem 0;
}

.entrance-description {
    font-size: 0.875rem;
    color: #212121;
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.entrance-directions-link {
    display: inline-block;
    font-size: 0.8125rem;
    color: #1a5632;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 150ms ease, border-color 150ms ease;
}

.entrance-directions-link:hover {
    color: #0a6e2f;
    border-bottom-color: #0a6e2f;
}

.entrance-directions-link:focus-visible {
    outline: 3px solid #1a5632;
    outline-offset: 2px;
    border-radius: 2px;
}

.entrance-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.entrance-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1a5632;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
    min-height: 0;
    white-space: nowrap;
}

.entrance-action-btn img {
    flex-shrink: 0;
}

.entrance-action-btn:hover {
    background: #e8f5ee;
    border-color: #1a5632;
    color: #1a5632;
}

.entrance-action-btn:focus-visible {
    outline: 3px solid #1a5632;
    outline-offset: 2px;
    border-radius: 4px;
}

.entrance-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 0.75rem 0;
}

/* =================================================================
   TABLET LAYOUT (1024px and below)
   ================================================================= */

@media (max-width: 1024px) {
    .info-panel {
        right: 1rem;
        top: 1rem;
        width: min(360px, calc(100% - 2rem));
    }
}

/* =================================================================
   MOBILE LAYOUT (800px and below)
   Full-width bottom sheet panels
   ================================================================= */

@media (max-width: 800px) {

    /* Building & parking panels fill the side-panel sheet */
    .building-list-panel,
    .parking-list-panel,
    .accessible-entrances-panel,
    .accessible-parking-panel {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 1050;
        transform: none;
    }
    .building-panel-header {
        padding: 1rem;
    }
    
    .building-list-items,
    .parking-list-items {
        padding: 0.5rem 1.4rem 1rem;
    }
  
    .building-panel-title {
        font-size: 1rem;
    }

    /* Hide back-nav inside info panel — X button handles close */
    #info-panel .panel-back-nav {
        display: none;
    }

    /* Info panel — fixed bottom sheet */
    .info-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: none;
        /* Full height when expanded */
        height: 85vh;
        border-radius: 1.5rem 1.5rem 0 0;
        z-index: 1060;
        transition: height var(--transition-base), box-shadow var(--transition-base);
    }

    .info-panel-close-icon {
        top: 0.75rem;
        right: 0.75rem;
    }

    /* Panel body scrolls when expanded */
    .info-panel-body {
        padding: 1.25rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Show handle pill on mobile */
    .info-panel-handle {
        display: inline-flex;
        justify-content: center;
    }

    /* Peek/collapsed state — opens here by default, shows name + action buttons */
    .info-panel.is-collapsed {
        /* ~42vh shows handle pill, building name, directions + street view buttons */
        height: 42vh;
        box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18);
    }

    /* Clip body in peek state — content below the fold fades out */
    .info-panel.is-collapsed .info-panel-body {
        max-height: calc(100% - 60px);
        overflow: hidden;
    }

    .info-panel.is-collapsed .info-panel-body::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 48px;
        background: linear-gradient(0deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
        pointer-events: none;
    }

    .info-panel.is-collapsed .info-panel-handle .handle-pill {
        background-color: rgba(148, 163, 184, 0.6);
    }
    /* --- Title above image: reorder via CSS flex order --- */
    .info-panel-body {
        display: flex;
        flex-direction: column;
    }

    #streetview-container {
        order: 2;
    }

    #name-section {
        order: 1;
    }

    #info-quick-actions {
        order: 3;
    }

    #address-section {
        order: 4;
    }

    #addl-info-section {
        order: 5;
    }

    #also-here-section {
        order: 6;
    }

    #accessible-section {
        order: 7;
    }
}

/* =================================================================
   REDUCED MOTION
   ================================================================= */

@media (prefers-reduced-motion: reduce) {
    .info-panel,
    .building-list-panel,
    .parking-list-panel,
    .accessible-entrances-panel,
    .accessible-parking-panel {
        transition: none;
    }
}

/* =================================================================
   SCROLLBAR STYLING
   ================================================================= */

.building-list-items::-webkit-scrollbar,
.parking-list-items::-webkit-scrollbar,
.info-panel-body::-webkit-scrollbar {
    width: 8px;
}

.building-list-items::-webkit-scrollbar-track,
.parking-list-items::-webkit-scrollbar-track,
.info-panel-body::-webkit-scrollbar-track {
    background-color: #fafafa;
}

.building-list-items::-webkit-scrollbar-thumb,
.parking-list-items::-webkit-scrollbar-thumb,
.info-panel-body::-webkit-scrollbar-thumb {
    background-color: #bdbdbd;
    border-radius: 9999px;
}

.building-list-items::-webkit-scrollbar-thumb:hover,
.parking-list-items::-webkit-scrollbar-thumb:hover,
.info-panel-body::-webkit-scrollbar-thumb:hover {
    background-color: #9e9e9e;
}
