/* The site's own popups (assets/js/zurgle-dialog.js) -- storefront, seller
   dashboard and wp-admin. Self-contained: its own font stack, colours and
   sizes, so it looks the same on every screen. */

.zdlg {
    --zdlg-tone: #2f7ea3;
    --zdlg-tone-soft: #e6f3f9;

    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    opacity: 0;
    transition: opacity .18s ease;
}

.zdlg.is-shown {
    opacity: 1;
}

.zdlg.is-danger {
    --zdlg-tone: #d92d20;
    --zdlg-tone-soft: #fdecea;
}

.zdlg.is-warning {
    --zdlg-tone: #b54708;
    --zdlg-tone-soft: #fff4e0;
}

.zdlg.is-success {
    --zdlg-tone: #157a42;
    --zdlg-tone-soft: #e7f7ee;
}

.zdlg-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .5);
    backdrop-filter: blur(2px);
}

.zdlg-box {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 400px;
    padding: 26px 24px 20px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .25);
    text-align: center;
    transform: translateY(8px) scale(.97);
    transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

.zdlg.is-shown .zdlg-box {
    transform: none;
}

.zdlg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--zdlg-tone-soft);
    color: var(--zdlg-tone);
}

.zdlg-icon svg {
    width: 26px;
    height: 26px;
}

.zdlg .zdlg-title {
    margin: 0;
    padding: 0;
    color: #1f2937;
    font-family: inherit;
    font-size: 18px !important;
    font-weight: 700;
    line-height: 1.35;
}

.zdlg-text {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.zdlg-field {
    margin: 16px 0 0;
    text-align: left;
}

.zdlg-label {
    display: block;
    margin: 0 0 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.zdlg .zdlg-input {
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
}

.zdlg .zdlg-input:focus {
    border-color: var(--zdlg-tone);
    box-shadow: 0 0 0 3px var(--zdlg-tone-soft);
    outline: none;
}

.zdlg .zdlg-input.is-invalid {
    border-color: #d92d20;
}

.zdlg-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.zdlg .zdlg-btn {
    flex: 1 1 0;
    min-height: 42px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.zdlg .zdlg-btn:active {
    transform: scale(.98);
}

.zdlg .zdlg-btn:focus-visible {
    outline: 2px solid var(--zdlg-tone);
    outline-offset: 2px;
}

.zdlg .zdlg-btn--ghost {
    border-color: #d0d5dd;
    background: #fff;
    color: #344054;
}

.zdlg .zdlg-btn--ghost:hover {
    background: #f9fafb;
}

.zdlg .zdlg-btn--ghost:focus-visible {
    outline-color: #98a2b3;
}

.zdlg .zdlg-btn--primary {
    background: #2f7ea3;
    color: #fff;
}

.zdlg .zdlg-btn--primary:hover {
    background: #1f5f7d;
}

.zdlg .zdlg-btn--danger {
    background: #d92d20;
    color: #fff;
}

.zdlg .zdlg-btn--danger:hover {
    background: #b42318;
}

html.zdlg-open {
    overflow: hidden;
}

@media (max-width: 420px) {
    .zdlg-actions {
        flex-direction: column-reverse;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zdlg,
    .zdlg-box {
        transition: none;
    }
}
