/* --- modal layout --- */
.pmodal.hidden {
    display: none;
}

.pmodal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pmodal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.pmodal-content {
    position: relative;
    width: 80vw;
    max-width: 640px;
    background: #000;
    /* frame color */
    border-radius: 8px;
    overflow: hidden;
    animation: zoomIn 0.35s ease forwards;
    transform: scale(0);
    /* start tiny */
}

@keyframes zoomIn {
    to {
        transform: scale(1);
    }
}

/* --- loader (simple spinner) --- */
.ploader {
    width: 48px;
    height: 48px;
    margin: 64px auto;
    border: 4px solid #fff2;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Close (X) --- */
.pclose {
    display: flex;              /* enable flex layout */
    justify-content: center;    /* center horizontally */
    align-items: center;        /* center vertically */
    width: 40px;
    height: 40px;
    background: white;
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    cursor: pointer;
    padding: 0;                 /* remove default padding */
}

.pclose svg {
    width: 20px;                /* optional: control SVG size */
    height: 20px;
    display: block;             /* remove extra spacing */
}

/* --- media fills area --- */
#pmodal-body img,
#pmodal-body video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
}

#pmodal-body video {
    background: #000;
}