/* WP Self Push — Frontend Push Prompt */

#wpsp-prompt {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2147483647;
    max-width: 370px;
    width: calc(100% - 48px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .38s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
    overflow: hidden;
    border: 1px solid #ececec;
}

#wpsp-prompt.wpsp-visible {
    transform: translateY(0);
    opacity: 1;
}

.wpsp-prompt-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}

.wpsp-prompt-icon {
    font-size: 22px;
    width: 46px; height: 46px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.wpsp-prompt-text { flex: 1; min-width: 0; }

.wpsp-prompt-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 3px;
    line-height: 1.3;
}

.wpsp-prompt-text p {
    margin: 0;
    font-size: 12px;
    color: #777;
    line-height: 1.5;
}

.wpsp-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.wpsp-prompt-actions button {
    border: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    transition: all .2s;
    white-space: nowrap;
}

.wpsp-prompt-actions button:active { transform: scale(.96); }

#wpsp-allow {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
#wpsp-allow:hover { box-shadow: 0 4px 14px rgba(99,102,241,.45); }

#wpsp-deny {
    background: #f4f4f5;
    color: #71717a;
}
#wpsp-deny:hover { background: #e8e8ea; }

/* Branding bar at bottom */
.wpsp-prompt-brand {
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    padding: 7px 18px;
    font-size: 10px;
    color: #bbb;
    text-align: right;
    letter-spacing: .03em;
}

/* Toast */
.wpsp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #1a1a2e;
    color: #fff;
    padding: 11px 24px;
    border-radius: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    z-index: 2147483647;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.wpsp-toast.wpsp-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile */
@media (max-width: 480px) {
    #wpsp-prompt {
        bottom: 0; right: 0;
        width: 100%; max-width: 100%;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
    }
    .wpsp-prompt-actions { flex-direction: row; }
    .wpsp-prompt-actions button { flex: 1; }
}

/* ============================================
   iOS SUPPORT — Part 24
   ============================================ */

/* Safe area insets for notch/Dynamic Island */
#wpsp-prompt {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* iOS Guide Prompt */
#wpsp-ios-guide {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.34,1.56,.64,1);
    padding: 0 12px env(safe-area-inset-bottom, 12px) 12px;
}
#wpsp-ios-guide.wpsp-ios-visible {
    transform: translateY(0);
}
.wpsp-ios-guide-inner {
    background: #fff;
    border-radius: 20px 20px 16px 16px;
    padding: 20px 18px 20px;
    box-shadow: 0 -4px 32px rgba(0,0,0,.18);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    position: relative;
    border-top: 4px solid #6366f1;
    margin-bottom: 8px;
}
.wpsp-ios-guide-icon {
    font-size: 32px;
    flex-shrink: 0;
    margin-top: 2px;
}
.wpsp-ios-guide-text {
    flex: 1;
    min-width: 0;
}
.wpsp-ios-guide-text strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 6px;
    font-family: -apple-system, 'SF Pro Display', sans-serif;
}
.wpsp-ios-guide-text p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 10px;
    font-family: -apple-system, sans-serif;
}
.wpsp-ios-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.wpsp-ios-steps span {
    font-size: 12px;
    background: #f0f1ff;
    color: #6366f1;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    font-family: -apple-system, sans-serif;
}
.wpsp-ios-guide-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: #f5f5f5;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wpsp-ios-guide-close:hover {
    background: #ede;
    color: #ef4444;
}

/* Arrow pointing to Safari share button */
#wpsp-ios-guide::after {
    content: '⬆️';
    position: absolute;
    bottom: calc(env(safe-area-inset-bottom, 12px) + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    animation: iosArrowBounce 1s ease infinite;
}
@keyframes iosArrowBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(-6px); }
}

/* Make existing prompt iOS-safe */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #wpsp-prompt {
        bottom: env(safe-area-inset-bottom, 24px) !important;
    }
}

/* ============================================
   10 NOTIFICATION BANNER STYLES — Part 28
   ============================================ */

/* ---- Base reset for all styles ---- */
#wpsp-prompt[data-style] {
    transition-property: transform, opacity;
}

/* ---- STYLE 2: Top Bar ---- */
#wpsp-prompt[data-style="topbar"] {
    top: 0; left: 0; right: 0; bottom: auto;
    width: 100%; max-width: 100%;
    border-radius: 0;
    border-top: none;
    border-bottom: 3px solid #6366f1;
    transform: translateY(-100%);
    opacity: 1;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
#wpsp-prompt[data-style="topbar"].wpsp-visible {
    transform: translateY(0);
}
#wpsp-prompt[data-style="topbar"] .wpsp-prompt-inner {
    padding: 12px 20px;
    max-width: 900px;
    margin: 0 auto;
}
#wpsp-prompt[data-style="topbar"] .wpsp-prompt-actions {
    flex-direction: row;
}
#wpsp-prompt[data-style="topbar"] .wpsp-prompt-brand { display: none; }

/* ---- STYLE 3: Floating Bell ---- */
#wpsp-bell-widget {
    position: fixed;
    z-index: 2147483647;
    cursor: pointer;
    animation: bellPulse 2.5s ease infinite;
}
#wpsp-bell-widget .wpsp-bell-btn {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(99,102,241,.45);
    border: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
#wpsp-bell-widget .wpsp-bell-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(99,102,241,.55);
}
#wpsp-bell-widget .wpsp-bell-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}
@keyframes bellPulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

/* ---- STYLE 4: Slide-in Card ---- */
#wpsp-prompt[data-style="slide-left"] {
    left: 24px; right: auto; bottom: 24px;
    transform: translateX(-120%);
    opacity: 1;
}
#wpsp-prompt[data-style="slide-left"].wpsp-visible {
    transform: translateX(0);
}
#wpsp-prompt[data-style="slide-right"] {
    right: 24px; left: auto; bottom: 24px;
    transform: translateX(120%);
    opacity: 1;
}
#wpsp-prompt[data-style="slide-right"].wpsp-visible {
    transform: translateX(0);
}
#wpsp-prompt[data-style="slide-left"] .wpsp-prompt-actions,
#wpsp-prompt[data-style="slide-right"] .wpsp-prompt-actions {
    flex-direction: column;
}

/* ---- STYLE 5: Full Screen Overlay ---- */
#wpsp-prompt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
    backdrop-filter: blur(4px);
}
#wpsp-prompt-overlay.wpsp-visible { opacity: 1; }
#wpsp-prompt[data-style="fullscreen"] {
    position: relative;
    bottom: auto; right: auto; top: auto; left: auto;
    max-width: 420px;
    width: calc(100% - 48px);
    transform: scale(.85);
    opacity: 0;
    transition: transform .38s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
    text-align: center;
}
#wpsp-prompt[data-style="fullscreen"].wpsp-visible {
    transform: scale(1);
    opacity: 1;
}
#wpsp-prompt[data-style="fullscreen"] .wpsp-prompt-inner {
    flex-direction: column;
    padding: 32px 24px 20px;
    text-align: center;
}
#wpsp-prompt[data-style="fullscreen"] .wpsp-prompt-icon {
    width: 64px; height: 64px;
    font-size: 32px;
    border-radius: 20px;
    margin-bottom: 8px;
}
#wpsp-prompt[data-style="fullscreen"] .wpsp-prompt-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 8px;
}
#wpsp-prompt[data-style="fullscreen"] .wpsp-prompt-actions button {
    width: 100%;
    padding: 13px;
    font-size: 14px;
}

/* ---- STYLE 6: Bottom Bar ---- */
#wpsp-prompt[data-style="bottombar"] {
    bottom: 0; left: 0; right: 0;
    width: 100%; max-width: 100%;
    border-radius: 0;
    border-bottom: none;
    border-top: 3px solid #6366f1;
    transform: translateY(100%);
    opacity: 1;
}
#wpsp-prompt[data-style="bottombar"].wpsp-visible {
    transform: translateY(0);
}
#wpsp-prompt[data-style="bottombar"] .wpsp-prompt-inner {
    padding: 12px 20px;
    max-width: 900px;
    margin: 0 auto;
}
#wpsp-prompt[data-style="bottombar"] .wpsp-prompt-actions { flex-direction: row; }
#wpsp-prompt[data-style="bottombar"] .wpsp-prompt-brand { display: none; }

/* ---- STYLE 7: Popup Modal ---- */
#wpsp-prompt[data-style="modal"] {
    max-width: 380px;
    width: calc(100% - 48px);
    transform: scale(.7) translateY(40px);
    opacity: 0;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
#wpsp-prompt[data-style="modal"].wpsp-visible {
    transform: scale(1) translateY(0);
    opacity: 1;
}
#wpsp-prompt[data-style="modal"] .wpsp-prompt-inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px 16px;
}
#wpsp-prompt[data-style="modal"] .wpsp-prompt-icon {
    width: 72px; height: 72px;
    font-size: 36px;
    border-radius: 24px;
    margin: 0 auto 16px;
}
#wpsp-prompt[data-style="modal"] .wpsp-prompt-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 12px;
}
#wpsp-prompt[data-style="modal"] .wpsp-prompt-actions button {
    width: 100%;
    padding: 14px;
    font-size: 14px;
}
#wpsp-prompt[data-style="modal"] .wpsp-prompt-text { text-align: center; width: 100%; }
#wpsp-prompt[data-style="modal"] .wpsp-prompt-text strong { font-size: 18px; margin-bottom: 8px; }
#wpsp-prompt[data-style="modal"] .wpsp-prompt-text p { font-size: 13px; }

/* ---- STYLE 8: Corner Minimal ---- */
#wpsp-prompt[data-style="minimal"] {
    max-width: 220px;
    border-radius: 14px;
    transform: scale(.8);
    opacity: 0;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s ease;
}
#wpsp-prompt[data-style="minimal"].wpsp-visible {
    transform: scale(1);
    opacity: 1;
}
#wpsp-prompt[data-style="minimal"] .wpsp-prompt-inner {
    flex-direction: column;
    padding: 14px;
    text-align: center;
    gap: 8px;
}
#wpsp-prompt[data-style="minimal"] .wpsp-prompt-icon {
    width: 36px; height: 36px;
    font-size: 18px;
    margin: 0 auto;
}
#wpsp-prompt[data-style="minimal"] .wpsp-prompt-text strong { font-size: 12px; }
#wpsp-prompt[data-style="minimal"] .wpsp-prompt-text p { display: none; }
#wpsp-prompt[data-style="minimal"] .wpsp-prompt-actions {
    flex-direction: row;
    width: 100%;
}
#wpsp-prompt[data-style="minimal"] .wpsp-prompt-actions button {
    flex: 1;
    padding: 7px 8px;
    font-size: 11px;
}
#wpsp-prompt[data-style="minimal"] .wpsp-prompt-brand { display: none; }

/* ---- STYLE 9: Chat Bubble ---- */
#wpsp-prompt[data-style="chat"] {
    max-width: 300px;
    border-radius: 18px 18px 4px 18px;
    transform: translateY(20px) scale(.9);
    opacity: 0;
}
#wpsp-prompt[data-style="chat"].wpsp-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: chatBounce .5s cubic-bezier(.34,1.56,.64,1);
}
#wpsp-chat-avatar {
    position: fixed;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
    z-index: 2147483646;
    animation: chatBounce .5s cubic-bezier(.34,1.56,.64,1) .1s both;
}
@keyframes chatBounce {
    0%   { transform: scale(.6) translateY(10px); opacity:0; }
    60%  { transform: scale(1.1); opacity:1; }
    100% { transform: scale(1) translateY(0); opacity:1; }
}

/* ---- STYLE 10: Gamified / Celebration ---- */
#wpsp-prompt[data-style="gamified"] {
    max-width: 380px;
    border-radius: 20px;
    transform: translateY(30px);
    opacity: 0;
    border-top: 4px solid #f59e0b;
    overflow: visible;
}
#wpsp-prompt[data-style="gamified"].wpsp-visible {
    transform: translateY(0);
    opacity: 1;
    animation: gamifiedIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes gamifiedIn {
    0%   { transform: translateY(40px) scale(.9); opacity:0; }
    60%  { transform: translateY(-8px) scale(1.02); opacity:1; }
    100% { transform: translateY(0) scale(1); opacity:1; }
}
#wpsp-prompt[data-style="gamified"] .wpsp-prompt-inner {
    flex-direction: column;
    padding: 24px 20px 16px;
    text-align: center;
}
#wpsp-prompt[data-style="gamified"] .wpsp-prompt-icon {
    font-size: 40px;
    background: linear-gradient(135deg, #fef9c3, #fde68a);
    width: 72px; height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
}
#wpsp-prompt[data-style="gamified"] .wpsp-prompt-text { text-align: center; width: 100%; }
#wpsp-prompt[data-style="gamified"] .wpsp-prompt-text strong { font-size: 18px; color: #1a1a2e; }
.wpsp-gamified-progress {
    width: 100%;
    background: #f0f0f0;
    border-radius: 8px;
    height: 10px;
    margin: 12px 0;
    overflow: hidden;
}
.wpsp-gamified-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 8px;
    animation: progressFill 1.2s ease .5s both;
    width: 0;
}
@keyframes progressFill {
    to { width: var(--prog-width, 85%); }
}
#wpsp-prompt[data-style="gamified"] .wpsp-prompt-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 8px;
}
#wpsp-prompt[data-style="gamified"] .wpsp-prompt-actions button {
    width: 100%;
    padding: 13px;
    font-size: 14px;
}
.wpsp-confetti-wrap {
    position: absolute;
    top: -12px;
    left: 0; right: 0;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
}
.wpsp-confetti-dot {
    font-size: 14px;
    animation: confettiFall 1.5s ease infinite;
}
.wpsp-confetti-dot:nth-child(2) { animation-delay: .2s; }
.wpsp-confetti-dot:nth-child(3) { animation-delay: .4s; }
.wpsp-confetti-dot:nth-child(4) { animation-delay: .6s; }
.wpsp-confetti-dot:nth-child(5) { animation-delay: .8s; }
@keyframes confettiFall {
    0%,100% { transform: translateY(0) rotate(0); opacity:1; }
    50%      { transform: translateY(-8px) rotate(15deg); opacity:.7; }
}

/* ---- Animation Speed Modifiers ---- */
#wpsp-prompt[data-anim-speed="slow"]   { transition-duration: .7s !important; }
#wpsp-prompt[data-anim-speed="fast"]   { transition-duration: .2s !important; }

/* ---- Position helpers ---- */
#wpsp-prompt[data-pos="top-left"]     { top:24px; left:24px; right:auto; bottom:auto; }
#wpsp-prompt[data-pos="top-right"]    { top:24px; right:24px; left:auto; bottom:auto; }
#wpsp-prompt[data-pos="top-center"]   { top:24px; left:50%; right:auto; bottom:auto; transform:translateX(-50%) translateY(-20px); }
#wpsp-prompt[data-pos="top-center"].wpsp-visible { transform:translateX(-50%) translateY(0); opacity:1; }
#wpsp-prompt[data-pos="bottom-left"]  { bottom:24px; left:24px; right:auto; top:auto; }
#wpsp-prompt[data-pos="bottom-right"] { bottom:24px; right:24px; left:auto; top:auto; }
#wpsp-prompt[data-pos="bottom-center"]{ bottom:24px; left:50%; right:auto; top:auto; transform:translateX(-50%) translateY(20px); }
#wpsp-prompt[data-pos="bottom-center"].wpsp-visible { transform:translateX(-50%) translateY(0); opacity:1; }

/* ---- Mobile overrides ---- */
@media (max-width:480px) {
    #wpsp-prompt[data-style="topbar"],
    #wpsp-prompt[data-style="bottombar"] {
        border-radius: 0;
    }
    #wpsp-prompt[data-style="slide-left"],
    #wpsp-prompt[data-style="slide-right"] {
        left: 0; right: 0;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        bottom: 0;
        transform: translateY(100%);
    }
    #wpsp-prompt[data-style="slide-left"].wpsp-visible,
    #wpsp-prompt[data-style="slide-right"].wpsp-visible {
        transform: translateY(0);
    }
}
