/* TE Push — Prompt Styles */
/* High-specificity selectors via #te-push-prompt to override theme styles */

:root {
    --te-push-accent: #1165f1;
    --te-push-accent-hover: #0d52cc;
    --te-push-accent-active: #0a43a8;
    --te-push-bg: rgba(255, 255, 255, 0.82);
    --te-push-text: #1a1a2e;
    --te-push-text-secondary: #5a5a72;
    --te-push-radius: 16px;
    --te-push-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    --te-push-border: rgba(255, 255, 255, 0.45);
    --te-push-backdrop: blur(20px) saturate(180%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --te-push-bg: rgba(30, 32, 44, 0.78);
        --te-push-text: #eaeaef;
        --te-push-text-secondary: #c0c0de;
        --te-push-border: rgba(255, 255, 255, 0.12);
        --te-push-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

/* ── Container ── */
#te-push-prompt.te-push-prompt {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-110%);
    opacity: 0;
    z-index: 999999;
    max-width: 520px;
    width: calc(100% - 24px);
    margin: 70px 0 0 0;
    padding: 18px 22px 16px;
    background: var(--te-push-bg);
    -webkit-backdrop-filter: var(--te-push-backdrop);
    backdrop-filter: var(--te-push-backdrop);
    border: 1px solid var(--te-push-border);
    border-radius: var(--te-push-radius);
    box-shadow: var(--te-push-shadow);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--te-push-text);
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    text-align: left;
    float: none;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
}

#te-push-prompt.te-push-prompt.te-push-prompt--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Close button ── */
#te-push-prompt .te-push-prompt__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    font-size: 0;
    line-height: 1;
    color: var(--te-push-text-secondary);
    cursor: pointer;
    padding: 0;
    margin: 0;
    outline: none;
    box-shadow: none;
    text-shadow: none;
    text-indent: 0;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    float: none;
    opacity: 1;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

#te-push-prompt .te-push-prompt__close svg {
    width: 14px;
    height: 14px;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

#te-push-prompt .te-push-prompt__close:hover,
#te-push-prompt .te-push-prompt__close:focus {
    background: rgba(0, 0, 0, 0.1);
    color: var(--te-push-text);
    transform: scale(1.1);
    outline: none;
    box-shadow: none;
}

/* ── Content ── */
#te-push-prompt .te-push-prompt__content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 16px 0;
    padding: 0 28px 0 0;
    border: none;
    background: none;
    box-shadow: none;
}

#te-push-prompt .te-push-prompt__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--te-push-accent), #3b82f6);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(17, 101, 241, 0.3);
    padding: 0;
    margin: 0;
    animation: te-push-bell-entrance 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

#te-push-prompt .te-push-prompt__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

#te-push-prompt .te-push-prompt__text {
    flex: 1;
    min-width: 0;
}

#te-push-prompt .te-push-prompt__title {
    font-size: 17px;
    font-weight: 500;
    margin: 0 0 3px 0;
    padding: 0;
    color: var(--te-push-text);
    letter-spacing: -0.01em;
    line-height: 1.4;
    border: none;
    background: none;
    text-transform: none;
}

#te-push-prompt .te-push-prompt__body {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    padding: 0;
    color: var(--te-push-text-secondary);
    line-height: 1.4em;
    border: none;
    background: none;
    text-transform: none;
}

/* ── Buttons ── */
#te-push-prompt .te-push-prompt__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

#te-push-prompt .te-push-prompt__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 22px;
    margin: 0;
    border-radius: 10px;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    text-shadow: none;
    letter-spacing: 0;
    white-space: nowrap;
    vertical-align: middle;
    box-shadow: none;
    outline: none;
    float: none;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#te-push-prompt .te-push-prompt__btn.te-push-prompt__btn--accept {
    background: linear-gradient(135deg, var(--te-push-accent), #3b82f6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(17, 101, 241, 0.25);
}

#te-push-prompt .te-push-prompt__btn.te-push-prompt__btn--accept:hover {
    background: linear-gradient(135deg, var(--te-push-accent-hover), #2563eb);
    box-shadow: 0 4px 16px rgba(17, 101, 241, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

#te-push-prompt .te-push-prompt__btn.te-push-prompt__btn--accept:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 1px 4px rgba(17, 101, 241, 0.2);
}

#te-push-prompt .te-push-prompt__btn.te-push-prompt__btn--dismiss {
    background: rgba(0, 0, 0, 0.10);
    color: var(--te-push-text-secondary);
    box-shadow: none;
}

#te-push-prompt .te-push-prompt__btn.te-push-prompt__btn--dismiss:hover {
    background: rgba(0, 0, 0, 0.09);
    color: var(--te-push-text);
}

#te-push-prompt .te-push-prompt__btn.te-push-prompt__btn--dismiss:active {
    transform: scale(0.97);
}

#te-push-prompt .te-push-prompt__btn:focus-visible {
    outline: 2px solid var(--te-push-accent);
    outline-offset: 2px;
}

/* ── Animations ── */
@keyframes te-push-bell-entrance {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(8deg);
    }
    80% {
        transform: scale(0.95) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* ── Tablet and below: reduce top margin ── */
@media (max-width: 960px) {
    #te-push-prompt.te-push-prompt {
        margin-top: 12px;
    }
}

/* ── Touch devices: bottom-positioned prompt ── */
@media (hover: none) and (pointer: coarse) {
    #te-push-prompt.te-push-prompt {
        top: auto;
        bottom: 10px;
        margin: 0;
        transform: translateX(-50%) translateY(110%);
    }

    #te-push-prompt.te-push-prompt.te-push-prompt--visible {
        transform: translateX(-50%) translateY(0);
    }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    #te-push-prompt.te-push-prompt {
        max-width: 100%;
        width: calc(100% - 16px);
        margin-top: 8px;
        padding: 14px 16px 12px;
        border-radius: 14px;
    }

    #te-push-prompt .te-push-prompt__icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 10px;
    }

    #te-push-prompt .te-push-prompt__icon svg {
        width: 20px;
        height: 20px;
    }

    #te-push-prompt .te-push-prompt__title {
        font-size: 16px;
    }

    #te-push-prompt .te-push-prompt__btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ── Landscape mobile compact ── */
@media (max-height: 500px) and (orientation: landscape) {
    #te-push-prompt .te-push-prompt__content {
        margin-bottom: 8px;
    }

    #te-push-prompt.te-push-prompt {
        padding: 10px 16px;
    }

    #te-push-prompt .te-push-prompt__body {
        display: none;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    #te-push-prompt.te-push-prompt {
        transition: none;
    }

    #te-push-prompt .te-push-prompt__icon {
        animation: none;
    }
}

/* ── High contrast ── */
@media (forced-colors: active) {
    #te-push-prompt.te-push-prompt {
        border: 2px solid;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ── Print ── */
@media print {
    #te-push-prompt.te-push-prompt {
        display: none;
    }
}
