/* =============================================================================
   publish-gate.css
   Styling for the "Publish hold" popup (Services:Publish = 1) and the server-side
   ServiceRestricted page. Theme-aligned (uses the site --nav-bg teal, falls back
   to #095a6f) and GIGW/WCAG-friendly: AA contrast, visible focus, no inline styles.
   Loaded only when the flag is on. CSP-nonce clean (external file, no inline code).
   ============================================================================= */

/* ---- Modal overlay (client-side click intercept) ---- */
.pg-modal {
    display: none;                        /* .pg-open reveals it; also hidden via [hidden] */
    position: fixed;
    inset: 0;
    z-index: 20000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pg-modal.pg-open {
    display: flex;
}

.pg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.pg-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.30);
    overflow: hidden;
}

/* ---- Shared header / body / footer (modal + page card) ---- */
.pg-modal__header,
.pg-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--nav-bg, #095a6f);
    color: #ffffff;
}

.pg-modal__title,
.pg-card__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.pg-modal__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.pg-modal__close:hover,
.pg-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.20);
}

.pg-modal__body,
.pg-card__body {
    padding: 20px 18px;
}

.pg-modal__text,
.pg-card__text {
    margin: 0;
    color: #1f2937;                       /* AA on white */
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.pg-modal__footer,
.pg-card__footer {
    padding: 0 18px 18px;
    text-align: center;
}

.pg-modal__home,
.pg-card__home {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 6px;
    background: var(--nav-bg, #095a6f);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.pg-modal__home:hover,
.pg-modal__home:focus,
.pg-card__home:hover,
.pg-card__home:focus {
    background: #074a5c;
    color: #ffffff;
    text-decoration: none;
}

/* Visible keyboard focus everywhere (GIGW / WCAG 2.4.7). */
.pg-modal__close:focus-visible,
.pg-modal__home:focus-visible,
.pg-card__home:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ---- Server-side ServiceRestricted page (no-JS, GIGW) ---- */
.pg-page {
    display: flex;
    justify-content: center;
    padding: 48px 16px;
}

.pg-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border: 1px solid #e7e7ec;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
