/* Sonic Popup — front-end modal styles. Scoped under .sonic-popup. */

.sonic-popup[hidden] {
    display: none !important;
}

.sonic-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Corner positions don't fill the viewport. */
.sonic-popup--bottom-right,
.sonic-popup--bottom-left {
    align-items: flex-end;
}
.sonic-popup--bottom-right { justify-content: flex-end; }
.sonic-popup--bottom-left { justify-content: flex-start; }

.sonic-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 24, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sonic-popup--overlay.is-open .sonic-popup__overlay { opacity: 1; }
.sonic-popup:not(.sonic-popup--overlay) .sonic-popup__overlay { display: none; }

.sonic-popup__box {
    position: relative;
    width: 100%;
    background: #ffffff;
    color: #1d2129;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    padding: 32px 28px;
    box-sizing: border-box;
    transform: translateY(14px) scale(0.98);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}
.sonic-popup.is-open .sonic-popup__box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.sonic-popup--bottom-right .sonic-popup__box,
.sonic-popup--bottom-left .sonic-popup__box {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.sonic-popup--dark .sonic-popup__box {
    background: #1b1f27;
    color: #f2f4f8;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.sonic-popup__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s ease;
}
.sonic-popup__close:hover { opacity: 1; }

.sonic-popup__title {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

.sonic-popup__body {
    font-size: 15px;
    line-height: 1.6;
}
.sonic-popup__body p:last-child { margin-bottom: 0; }

.sonic-popup__actions {
    margin: 22px 0 0;
}

.sonic-popup__cta {
    display: inline-block;
    background: #2563eb;
    color: #ffffff !important;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.15s ease;
}
.sonic-popup__cta:hover { background: #1d4ed8; }

.sonic-popup--dark .sonic-popup__cta { background: #3b82f6; }
.sonic-popup--dark .sonic-popup__cta:hover { background: #2563eb; }

/* Click-to-open button rendered by the shortcode. */
.sonic-popup-trigger {
    display: inline-block;
    cursor: pointer;
}
