/* ── Premodern Sales Control — Modal ───────────────────────────────────── */
/* Visual paired with the Premodern theme:
   gold #d4af37, bg #120c08, GoudyMedieval / Plantin.
   Falls back gracefully when the theme is not active. */

.psc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.psc-modal[aria-hidden="false"] { display: flex; }

.psc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 12, 8, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: psc-fade-in .25s ease-out;
    cursor: pointer;
}

.psc-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: rgba(23, 15, 10, 0.94);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 4px;
    box-shadow:
        0 20px 60px rgba(212, 175, 55, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    padding: 2.5rem 2rem 2rem;
    color: #fff;
    text-align: center;
    font-family: 'Plantin', Georgia, serif;
    animation: psc-scale-in .28s cubic-bezier(.18, .89, .32, 1.15);
}

/* Ornamental top accent line */
.psc-modal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    opacity: .7;
}

.psc-modal-emblem {
    color: #d4af37;
    font-size: 1.5rem;
    line-height: 1;
    margin: -0.5rem 0 0.75rem;
    letter-spacing: .15em;
    opacity: .85;
    user-select: none;
}

.psc-modal-title {
    font-family: 'GoudyMedieval', 'Times New Roman', serif;
    font-weight: 400;
    font-size: 1.6rem;
    color: #d4af37;
    margin: 0 0 .85rem;
    letter-spacing: .02em;
    line-height: 1.25;
    text-shadow: 0 0 24px rgba(212, 175, 55, 0.25);
}

.psc-modal-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
    margin: 0 0 1.75rem;
    white-space: pre-line;
}

.psc-modal-ok {
    display: inline-block;
    background: linear-gradient(90deg, #d4af37, #8b5a2b);
    color: #120c08;
    font-family: 'Plantin', Georgia, serif;
    font-weight: 700;
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    border: none;
    padding: .85rem 2.25rem;
    border-radius: 3px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .25s ease, filter .2s ease;
}
.psc-modal-ok:hover,
.psc-modal-ok:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.35);
    filter: brightness(1.06);
    outline: none;
}
.psc-modal-ok:active { transform: translateY(0); }

.psc-modal-close {
    position: absolute;
    top: .5rem;
    right: .85rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color .2s ease, background .2s ease;
}
.psc-modal-close:hover,
.psc-modal-close:focus-visible {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    outline: none;
}

@keyframes psc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes psc-scale-in {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Mobile */
@media (max-width: 480px) {
    .psc-modal { padding: 1rem; }
    .psc-modal-card { padding: 2.25rem 1.35rem 1.5rem; }
    .psc-modal-title { font-size: 1.35rem; }
    .psc-modal-message { font-size: .95rem; }
    .psc-modal-ok { width: 100%; padding: .95rem 1rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .psc-modal-backdrop,
    .psc-modal-card { animation: none; }
    .psc-modal-ok { transition: none; }
}

/* Body lock helper (added by JS) */
body.psc-modal-open { overflow: hidden; }

/* Trigger buttons inserted in WooCommerce loops/single keep the page tidy */
.psc-trigger { cursor: pointer; }
