/* ВАЖЛИВО: theme_ghost.css малює фон через html І body::before.
   Тому для профілю перебиваємо обидва шари однією CSS-змінною. */
html.az-profile-custom-bg {
    background-image: var(--az-profile-background-image) !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-size: cover !important;
}
html.az-profile-custom-bg body::before {
    background-image: var(--az-profile-background-image) !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

/* AZ Profile Background SAFE
   Не змінює ширину, сітку, блоки, шапку або обкладинку профілю. */

.az-pbg-button {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147483000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 15px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    background: rgba(12,16,25,.94);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(0,0,0,.48);
}
.az-pbg-button:hover {
    color: #fff;
    transform: translateY(-1px);
}

.az-pbg-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483640;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,.76);
}
.az-pbg-modal.is-open { display: flex; }

.az-pbg-dialog {
    width: min(940px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 16px;
    background: #171b25;
    box-shadow: 0 25px 80px rgba(0,0,0,.68);
}
.az-pbg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.az-pbg-head h4 {
    margin: 0;
    color: #fff;
}
.az-pbg-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
}
.az-pbg-body { padding: 18px; }
.az-pbg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.az-pbg-card {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 13px;
    background: #111827;
    color: #fff;
    text-align: left;
    cursor: pointer;
}
.az-pbg-card:hover,
.az-pbg-card.is-active { border-color: #ffb44a; }
.az-pbg-card img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.az-pbg-card strong,
.az-pbg-card span {
    display: block;
    padding-left: 11px;
    padding-right: 11px;
}
.az-pbg-card strong { padding-top: 9px; }
.az-pbg-card span {
    padding-top: 3px;
    padding-bottom: 10px;
    color: #ffb44a;
    font-size: 12px;
}
.az-pbg-note {
    margin: 12px 0 0;
    color: rgba(255,255,255,.58);
    font-size: 12px;
}
body.az-pbg-lock { overflow: hidden; }

@media (max-width: 720px) {
    .az-pbg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .az-pbg-button { right: 12px; bottom: 12px; }
}

.az-pbg-standard-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 150px;
    padding: 15px;
    background:
        linear-gradient(rgba(11,19,38,.22), rgba(11,19,38,.22)),
        url("/templates/standart/img/play31.png") center top / cover no-repeat;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 2px 8px #000;
}
