/* ═══════════════════════════════════════════════════════════════════════════
   CMS Panorama Plugin — public styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Inline single viewer ─────────────────────────────────────────────────── */
.pano-wrap {
    margin: 1.5rem 0;
}
.pano-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: .35rem;
}
.pano-desc {
    font-size: .9rem;
    color: #4b5563;
    margin-bottom: .75rem;
    line-height: 1.55;
}
.pano-viewer {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    min-height: 220px;
}

/* ── Gallery grid ─────────────────────────────────────────────────────────── */
.pano-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}
.pano-gallery-item {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: box-shadow .2s, transform .2s;
}
.pano-gallery-item:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}
.pano-gallery-thumb-wrap {
    position: relative;
    overflow: hidden;
    height: 170px;
}
.pano-gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.pano-gallery-item:hover .pano-gallery-thumb {
    transform: scale(1.06);
}
.pano-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.45) 0%, transparent 55%);
    display: flex;
    align-items: flex-end;
    padding: .65rem .75rem;
    opacity: 0;
    transition: opacity .2s;
}
.pano-gallery-item:hover .pano-gallery-overlay {
    opacity: 1;
}
.pano-360-badge {
    background: #6366f1;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 3px 9px;
    border-radius: 20px;
}
.pano-gallery-info {
    padding: .75rem 1rem;
}
.pano-gallery-title {
    font-size: .95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pano-gallery-desc {
    font-size: .8rem;
    color: #6b7280;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Modal viewer ─────────────────────────────────────────────────────────── */
.pano-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.pano-modal--open {
    display: flex;
}
.pano-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(4px);
}
.pano-modal-inner {
    position: relative;
    z-index: 1;
    width: min(96vw, 1100px);
    height: min(88vh, 700px);
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
}
.pano-modal-viewer {
    flex: 1;
    min-height: 0;
}
.pano-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 10;
    background: rgba(0, 0, 0, .55);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.pano-modal-close:hover {
    background: rgba(239, 68, 68, .8);
}
.pano-modal-footer {
    padding: .75rem 1.25rem;
    background: rgba(15, 23, 42, .92);
    border-top: 1px solid rgba(255,255,255,.08);
    min-height: 0;
}
.pano-modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: .15rem;
}
.pano-modal-desc {
    font-size: .82rem;
    color: #94a3b8;
    line-height: 1.45;
}

/* ── Pannellum overrides ──────────────────────────────────────────────────── */
.pano-viewer .pnlm-container,
.pano-modal-viewer .pnlm-container {
    border-radius: inherit;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.pano-empty {
    padding: 1rem;
    color: #9ca3af;
    font-style: italic;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pano-gallery {
        grid-template-columns: 1fr;
    }
    .pano-modal-inner {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }
}
