/**
 * Generator Gate
 * Locked control buttons + the shared Pro modal.
 *
 * The locked buttons deliberately reuse each tool's own button classes
 * (.si-upload-label, .si-btn-primary) so they inherit that tool's look.
 * The rules here only add what a <button> doesn't get for free — the tool
 * stylesheets use !important throughout, so anything they already set is
 * left well alone rather than fought over.
 */

/* ── Locked lookalike buttons ─────────────────────────────────────────── */

.si-pro-lock {
    /* A <button> won't inherit the page font the way the real <label> does. */
    font-family: inherit !important;
    cursor: pointer;
    position: relative;
}

.si-pro-lock-icon {
    display: inline-block;
    vertical-align: -1px;
    margin-right: 6px;
    opacity: 0.75;
}

.si-pro-lock:hover .si-pro-lock-icon { opacity: 1; }

/* ── Modal ────────────────────────────────────────────────────────────── */

.si-pro-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.si-pro-modal[hidden] { display: none; }

.si-pro-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 8, 0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.si-pro-modal__panel {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--si-bg, #131316);
    border: 1px solid var(--si-border, #2d2d35);
    border-radius: 10px;
    padding: 28px 26px 24px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    outline: none;
    animation: si-pro-modal-in 0.16s ease-out;
}

@keyframes si-pro-modal-in {
    from { opacity: 0; transform: translateY(6px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .si-pro-modal__panel { animation: none; }
}

/**
 * The theme styles bare <button> elements globally (that's where the blue
 * box came from), so every inherited property is reset explicitly rather
 * than relying on the cascade. `all: unset` isn't an option here — it
 * would drop the absolute positioning too.
 */
.si-pro-modal__x {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px !important;
    height: 28px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: var(--si-label, #9a9aa4) !important;
    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.si-pro-modal__x:hover,
.si-pro-modal__x:focus,
.si-pro-modal__x:active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Keyboard users still get a visible ring. */
.si-pro-modal__x:focus-visible {
    outline: 2px solid var(--si-accent, #162ae4) !important;
    outline-offset: 2px;
}

.si-pro-modal__eyebrow {
    margin: 0 0 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--si-accent, #162ae4);
}

/* Keep the eyebrow legible if a tool's accent is very dark. */
.si-pro-modal__eyebrow { filter: brightness(1.6); }

.si-pro-modal__title {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 700;
    color: #fff;
    text-wrap: balance;
}

.si-pro-modal__text {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--si-label, #9a9aa4);
    text-wrap: pretty;
}

.si-pro-modal__cta {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    background: var(--si-accent, #162ae4);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background 0.15s;
}

.si-pro-modal__cta:hover { background: var(--si-accent-hover, #1f3af0); }

.si-pro-modal__alt {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--si-label, #9a9aa4) !important;
    text-decoration: underline !important;
}

.si-pro-modal__alt:hover { color: #fff !important; }

/* Prevent the page scrolling behind an open modal. */
body.si-pro-modal-open { overflow: hidden; }
