.mlsp-wrap,
.mlsp-wrap * {
    box-sizing: border-box;
}

.mlsp-wrap {
    position: fixed;
    z-index: 999999;
    font-family: inherit;
    color: #111827;
}

.mlsp-bottom-right {
    right: 22px;
    bottom: 22px;
}

.mlsp-bottom-left {
    left: 22px;
    bottom: 22px;
}

.mlsp-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    min-width: 66px;
    min-height: 66px;
    padding: 0;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(241,245,249,0.98) 38%, rgba(148,163,184,0.98) 100%);
    color: #0f172a;
    box-shadow:
        0 22px 55px rgba(15, 23, 42, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -12px 22px rgba(71, 85, 105, 0.15);
    cursor: pointer;
    overflow: visible;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.mlsp-trigger::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.88), rgba(226,232,240,0.72));
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 8px 16px rgba(255, 255, 255, 0.7), inset 0 -8px 18px rgba(51, 65, 85, 0.12);
    pointer-events: none;
}

.mlsp-trigger-orbit {
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.45), rgba(148,163,184,0.08));
    opacity: 0.95;
    pointer-events: none;
}

.mlsp-trigger:hover,
.mlsp-trigger:focus {
    transform: translateY(-3px) scale(1.035);
    border-color: rgba(71, 85, 105, 0.9);
    box-shadow:
        0 28px 68px rgba(15, 23, 42, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -12px 22px rgba(71, 85, 105, 0.18);
    outline: none;
}

.mlsp-trigger-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, #111827 0%, #334155 56%, #64748b 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255,255,255,0.18);
}

.mlsp-trigger-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: -0.04em;
    line-height: 1;
}

.mlsp-trigger-spark {
    position: absolute;
    right: -5px;
    top: -5px;
    display: block;
    width: 18px;
    height: 18px;
    fill: #f8fafc;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.2));
}

.mlsp-trigger-text {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    background: rgba(255,255,255,0.94);
    color: #111827;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mlsp-bottom-left .mlsp-trigger-text {
    left: calc(100% + 10px);
    right: auto;
    transform: translateY(-50%) translateX(-8px);
}

.mlsp-trigger:hover .mlsp-trigger-text,
.mlsp-trigger:focus .mlsp-trigger-text {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.mlsp-panel {
    position: absolute;
    width: min(370px, calc(100vw - 32px));
    padding: 24px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 26px;
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 1) 0%, rgba(255,255,255,0) 42%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 30px 82px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255,255,255,0.96);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
    overflow: hidden;
}

.mlsp-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    height: 5px;
    background: linear-gradient(90deg, #e5e7eb 0%, #94a3b8 50%, #f8fafc 100%);
}

.mlsp-wrap.is-open .mlsp-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.mlsp-bottom-right .mlsp-panel {
    right: 0;
    bottom: calc(100% + 18px);
}

.mlsp-bottom-left .mlsp-panel {
    left: 0;
    bottom: calc(100% + 18px);
}

.mlsp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    color: #334155;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.9);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.mlsp-close span {
    position: absolute;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mlsp-close span:first-child {
    transform: rotate(45deg);
}

.mlsp-close span:last-child {
    transform: rotate(-45deg);
}

.mlsp-close:hover,
.mlsp-close:focus {
    transform: translateY(-1px) rotate(90deg);
    border-color: rgba(100, 116, 139, 0.82);
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.95);
    outline: none;
}

.mlsp-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 10px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 999px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mlsp-panel h3 {
    margin: 0 42px 10px 0;
    color: #0f172a;
    font-size: 21px;
    font-weight: 950;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.mlsp-panel p {
    margin: 0 0 16px;
    color: #475569;
    font-size: 14px;
    line-height: 1.58;
}

.mlsp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 13px 17px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 52%, #64748b 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 950;
    letter-spacing: -0.01em;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.25), inset 0 1px 0 rgba(255,255,255,0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.mlsp-button:hover,
.mlsp-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.32), inset 0 1px 0 rgba(255,255,255,0.18);
    color: #ffffff !important;
    outline: none;
}

.mlsp-button.is-loading {
    opacity: 0.78;
    pointer-events: none;
}

.mlsp-button.is-added {
    background: linear-gradient(135deg, #14532d 0%, #166534 55%, #64748b 100%);
}

.mlsp-button-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    line-height: 1;
}

.mlsp-message {
    display: none;
    margin-top: 11px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(203, 213, 225, 0.7);
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.mlsp-message.is-visible {
    display: block;
}

.mlsp-message a {
    color: #0f172a;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mlsp-message.is-error {
    background: #fff7ed;
    border-color: rgba(251, 146, 60, 0.38);
    color: #9a3412;
}

@media (max-width: 640px) {
    .mlsp-wrap {
        max-width: calc(100vw - 132px);
    }

    .mlsp-bottom-right {
        right: 22px;
        bottom: 18px;
    }

    .mlsp-bottom-left {
        left: 22px;
        bottom: 18px;
    }

    .mlsp-trigger {
        width: 58px;
        height: 58px;
        min-width: 58px;
        min-height: 58px;
    }

    .mlsp-trigger::before {
        inset: 6px;
    }

    .mlsp-trigger-icon {
        width: 38px;
        height: 38px;
    }

    .mlsp-trigger-spark {
        right: -4px;
        top: -4px;
        width: 16px;
        height: 16px;
    }

    .mlsp-trigger-text {
        display: none;
    }

    .mlsp-panel {
        width: min(300px, calc(100vw - 132px));
        max-height: calc(100vh - 116px);
        max-height: calc(100dvh - 116px);
        padding: 20px;
        border-radius: 22px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mlsp-bottom-right .mlsp-panel,
    .mlsp-bottom-left .mlsp-panel {
        bottom: calc(100% + 14px);
    }

    .mlsp-bottom-right .mlsp-panel {
        right: 44px;
    }

    .mlsp-bottom-left .mlsp-panel {
        left: 44px;
    }

    .mlsp-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
    }

    .mlsp-kicker {
        max-width: calc(100% - 42px);
        margin-bottom: 10px;
        padding: 6px 9px;
        font-size: 10px;
        line-height: 1.15;
    }

    .mlsp-panel h3 {
        margin-right: 38px;
        font-size: 18px;
        line-height: 1.18;
    }

    .mlsp-panel p {
        margin-bottom: 14px;
        font-size: 13.5px;
        line-height: 1.55;
    }


    .mlsp-button {
        min-height: 50px;
        padding: 14px 18px;
        border-radius: 15px;
        font-size: 13.5px;
    }

    .mlsp-message {
        font-size: 12.5px;
    }
}

/* v1.0.5: hard isolation from theme button colors (Hello/Elementor and similar themes). */
.mlsp-wrap button.mlsp-trigger,
.mlsp-wrap button.mlsp-trigger:hover,
.mlsp-wrap button.mlsp-trigger:focus,
.mlsp-wrap button.mlsp-trigger:active {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 66px !important;
    height: 66px !important;
    min-width: 66px !important;
    min-height: 66px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(203, 213, 225, 0.78) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(241,245,249,0.98) 38%, rgba(148,163,184,0.98) 100%) !important;
    color: #0f172a !important;
    text-decoration: none !important;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -12px 22px rgba(71, 85, 105, 0.15) !important;
}

.mlsp-wrap button.mlsp-close,
.mlsp-wrap button.mlsp-close:hover,
.mlsp-wrap button.mlsp-close:focus,
.mlsp-wrap button.mlsp-close:active {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(203, 213, 225, 0.82) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
    color: #334155 !important;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

.mlsp-wrap button.mlsp-close span,
.mlsp-wrap button.mlsp-close:hover span,
.mlsp-wrap button.mlsp-close:focus span,
.mlsp-wrap button.mlsp-close:active span {
    background: #334155 !important;
    border: 0 !important;
}

.mlsp-wrap a.mlsp-button,
.mlsp-wrap a.mlsp-button:hover,
.mlsp-wrap a.mlsp-button:focus,
.mlsp-wrap a.mlsp-button:active,
.mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy,
.mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy:hover,
.mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy:focus,
.mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy:active {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 52px !important;
    padding: 15px 22px !important;
    border: 1px solid rgba(71, 85, 105, 0.92) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #111827 0%, #334155 52%, #64748b 100%) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24), inset 0 1px 0 rgba(255,255,255,0.16) !important;
    cursor: pointer !important;
}

.mlsp-wrap a.mlsp-button:hover,
.mlsp-wrap a.mlsp-button:focus,
.mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy:hover,
.mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy:focus {
    transform: translateY(-2px) !important;
    border-color: rgba(15, 23, 42, 1) !important;
    background: linear-gradient(135deg, #020617 0%, #1f2937 52%, #475569 100%) !important;
    color: #ffffff !important;
    outline: none !important;
}

.mlsp-wrap a.mlsp-button .mlsp-button-label,
.mlsp-wrap a.mlsp-button .mlsp-button-arrow,
.mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy .mlsp-button-label,
.mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy .mlsp-button-arrow {
    color: #ffffff !important;
    background: transparent !important;
    border: 0 !important;
}

.mlsp-shortcode-buy-wrap {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    font-family: inherit !important;
}

.mlsp-shortcode-buy-wrap .mlsp-message {
    width: 100% !important;
    max-width: 420px !important;
}

/* v1.0.10: keep the mobile popup narrow, but return the floating icon to its original edge position. */
@media (max-width: 640px) {
    .mlsp-wrap button.mlsp-trigger,
    .mlsp-wrap button.mlsp-trigger:hover,
    .mlsp-wrap button.mlsp-trigger:focus,
    .mlsp-wrap button.mlsp-trigger:active {
        width: 58px !important;
        height: 58px !important;
        min-width: 58px !important;
        min-height: 58px !important;
    }

    .mlsp-wrap button.mlsp-close,
    .mlsp-wrap button.mlsp-close:hover,
    .mlsp-wrap button.mlsp-close:focus,
    .mlsp-wrap button.mlsp-close:active {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }

    .mlsp-wrap a.mlsp-button,
    .mlsp-wrap a.mlsp-button:hover,
    .mlsp-wrap a.mlsp-button:focus,
    .mlsp-wrap a.mlsp-button:active,
    .mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy,
    .mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy:hover,
    .mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy:focus,
    .mlsp-shortcode-buy-wrap a.mlsp-shortcode-buy:active {
        min-height: 50px !important;
        padding: 14px 18px !important;
        font-size: 13.5px !important;
        line-height: 1.15 !important;
    }
}
