/* Modal fullscreen de galeria no hub do perfil */
.ps-galeria-hub-modal[hidden],
.ps-galeria-modo-modal[hidden] {
    display: none !important;
}

.ps-galeria-hub-modal {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: stretch;
    justify-content: center;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.ps-galeria-hub-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.ps-galeria-hub-modal__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(100%, 920px);
    max-height: 100vh;
    margin: auto;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

@media (min-width: 769px) {
    .ps-galeria-hub-modal {
        padding: 1.5rem;
        align-items: center;
    }

    .ps-galeria-hub-modal__panel {
        max-height: min(92vh, 900px);
        border-radius: 12px;
    }
}

.ps-galeria-hub-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.ps-galeria-hub-modal__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
}

.ps-galeria-hub-modal__sub {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.ps-galeria-hub-modal__head-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.ps-galeria-hub-toggle .btn.active {
    background: #467fcf;
    border-color: #467fcf;
    color: #fff;
}

.ps-galeria-hub-link-full {
    font-size: 0.75rem;
    color: #467fcf;
    white-space: nowrap;
    padding: 0.25rem 0.4rem;
}

.ps-galeria-hub-close {
    border: none;
    background: #f3f4f6;
    color: #374151;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.ps-galeria-hub-close:hover {
    background: #e5e7eb;
}

.ps-galeria-hub-modal__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 1rem 1.25rem;
    min-height: 120px;
}

body.ps-galeria-hub-aberto {
    overflow: hidden;
}

.ps-galeria-hub-loading {
    text-align: center;
    padding: 2rem;
}

.ps-galeria-hub-lista .post-id {
    margin-bottom: 0.75rem;
}

.ps-galeria-hub-lista .card {
    margin-bottom: 0;
}

.ps-galeria-hub-albuns {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ps-galeria-hub-album {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.ps-galeria-hub-album:hover {
    border-color: #467fcf;
    background: #f8fafc;
}

.ps-galeria-hub-album__icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eff6ff;
    color: #467fcf;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ps-galeria-hub-album__body {
    flex: 1;
    min-width: 0;
}

.ps-galeria-hub-album__body strong {
    display: block;
    font-size: 0.95rem;
    color: #111827;
}

.ps-galeria-hub-album__body small {
    color: #6b7280;
    font-size: 0.8rem;
}

.ps-galeria-hub-album__chev {
    color: #9ca3af;
}

.ps-galeria-hub-album-back-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.ps-galeria-hub-album-current {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.ps-galeria-hub-bio {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #374151;
}

.ps-galeria-hub-marketplace .card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ps-galeria-hub-agenda__texto {
    font-size: 0.95rem;
    line-height: 1.6;
}

.ps-galeria-hub-app__frame {
    width: 100%;
    min-height: min(70vh, 520px);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.ps-galeria-hub-app .btn-orange {
    background: #f76707;
    border-color: #f76707;
    color: #fff;
}

.ps-galeria-hub-app .btn-orange:hover {
    background: #e8590c;
    border-color: #e8590c;
    color: #fff;
}

.ps-galeria-hub-sentinel {
    height: 1px;
    width: 100%;
}

.ps-galeria-hub-ajax-load img {
    max-width: 48px;
}

/* Embeds de vídeo dentro do modal */
.ps-galeria-hub-modal .facebook-responsive,
.ps-galeria-hub-modal .youtube-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
}

.ps-galeria-hub-modal .facebook-responsive iframe,
.ps-galeria-hub-modal .youtube-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

@media (max-width: 768px) {
    .ps-galeria-hub-modal__panel {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .ps-galeria-hub-modal__head {
        padding: 0.85rem 0.75rem 0.65rem;
    }

    .ps-galeria-hub-modal__body {
        padding: 0.65rem 0.75rem 1rem;
    }

    .ps-galeria-hub-lista .post-id {
        flex: 0 0 100%;
        max-width: 100%;
    }

    body.ps-embed-ativo.ps-galeria-hub-aberto {
        padding-bottom: 148px;
    }
}
