/* ============================================================
 * Yesdu Push PWA — Yükleme Banner'ı (Modern UI)
 * @version 3.0.0
 * ============================================================ */

.yesdu-pwa-banner {
    --yesdu-pwa-color: #0073aa;
    --yesdu-pwa-radius: 18px;
    --yesdu-pwa-shadow: 0 20px 50px -12px rgba(0, 0, 0, .25),
                        0 8px 20px -8px rgba(0, 0, 0, .15);
    --yesdu-pwa-shadow-hover: 0 24px 60px -12px rgba(0, 0, 0, .3),
                              0 10px 24px -8px rgba(0, 0, 0, .2);

    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    pointer-events: none;
    display: flex;
    justify-content: center;
    padding: 16px;
    transition: opacity .35s cubic-bezier(.32, .72, 0, 1);
}

.yesdu-pwa-banner-top {
    top: 0;
    padding-top: max(16px, env(safe-area-inset-top));
}
.yesdu-pwa-banner-bottom {
    bottom: 0;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.yesdu-pwa-banner-content {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 640px;
    padding: 16px 20px;

    background: #ffffff;
    border-radius: var(--yesdu-pwa-radius);
    box-shadow: var(--yesdu-pwa-shadow);
    border: 1px solid rgba(255, 255, 255, .1);

    opacity: 0;
    transform: translateY(-20px) scale(.96);
    transition:
        opacity .35s cubic-bezier(.32, .72, 0, 1),
        transform .35s cubic-bezier(.32, .72, 0, 1),
        box-shadow .25s ease;
    will-change: opacity, transform;
}

.yesdu-pwa-banner-bottom .yesdu-pwa-banner-content {
    transform: translateY(20px) scale(.96);
}

.yesdu-pwa-banner-show .yesdu-pwa-banner-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.yesdu-pwa-banner-content:hover {
    box-shadow: var(--yesdu-pwa-shadow-hover);
}

.yesdu-pwa-banner-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        var(--yesdu-pwa-color) 0%,
        color-mix(in srgb, var(--yesdu-pwa-color) 60%, #000) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: .15;
    pointer-events: none;
}

.yesdu-pwa-banner-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, .1),
        0 1px 2px rgba(0, 0, 0, .06);
    background: #f0f0f1;
    border: 2px solid #fff;
}

.yesdu-pwa-banner-icon-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        var(--yesdu-pwa-color) 0%,
        color-mix(in srgb, var(--yesdu-pwa-color) 70%, #000) 100%);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    box-shadow:
        0 8px 20px -4px color-mix(in srgb, var(--yesdu-pwa-color) 50%, transparent),
        0 2px 4px rgba(0, 0, 0, .1);
    border: 2px solid rgba(255, 255, 255, .4);
}

.yesdu-pwa-banner-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}

.yesdu-pwa-banner-title {
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    color: #0f1419;
    letter-spacing: -0.01em;
    margin: 0;
    display: block;
}

.yesdu-pwa-banner-desc {
    font-size: 13px;
    line-height: 1.45;
    color: #6b7280;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yesdu-pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.yesdu-pwa-banner-install {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;

    background: linear-gradient(135deg,
        var(--yesdu-pwa-color) 0%,
        color-mix(in srgb, var(--yesdu-pwa-color) 80%, #000) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;

    box-shadow:
        0 6px 16px -4px color-mix(in srgb, var(--yesdu-pwa-color) 50%, transparent),
        0 2px 4px rgba(0, 0, 0, .08);

    transition:
        transform .15s cubic-bezier(.32, .72, 0, 1),
        box-shadow .2s ease,
        filter .15s ease;

    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.yesdu-pwa-banner-install::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, .2) 0%,
        rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
}

.yesdu-pwa-banner-install:hover {
    transform: translateY(-1px);
    box-shadow:
        0 10px 24px -6px color-mix(in srgb, var(--yesdu-pwa-color) 60%, transparent),
        0 4px 8px rgba(0, 0, 0, .12);
    filter: brightness(1.05);
}

.yesdu-pwa-banner-install:active {
    transform: translateY(0) scale(.98);
    box-shadow:
        0 4px 12px -4px color-mix(in srgb, var(--yesdu-pwa-color) 50%, transparent);
}

.yesdu-pwa-banner-install:focus-visible {
    outline: 2px solid var(--yesdu-pwa-color);
    outline-offset: 3px;
}

.yesdu-pwa-banner-install:disabled {
    opacity: .75;
    cursor: wait;
    transform: none;
    filter: brightness(.95);
}

.yesdu-pwa-banner-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    flex-shrink: 0;

    background: transparent;
    border: none;
    border-radius: 10px;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;

    font-family: inherit;
    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;

    -webkit-tap-highlight-color: transparent;
}

.yesdu-pwa-banner-close:hover {
    background: #f3f4f6;
    color: #ef4444;
}

.yesdu-pwa-banner-close:active {
    transform: scale(.92);
}

.yesdu-pwa-banner-close:focus-visible {
    outline: 2px solid var(--yesdu-pwa-color);
    outline-offset: 2px;
}

.yesdu-pwa-banner-close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    fill: none;
}

.yesdu-pwa-banner-install.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: yesdu-spin .7s linear infinite;
    margin-left: 4px;
}

@keyframes yesdu-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .yesdu-pwa-banner {
        padding: 12px;
    }

    .yesdu-pwa-banner-top {
        padding-top: max(12px, env(safe-area-inset-top));
    }
    .yesdu-pwa-banner-bottom {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .yesdu-pwa-banner-content {
        padding: 14px 16px;
        gap: 12px;
        border-radius: 16px;
        flex-wrap: wrap;
    }

    .yesdu-pwa-banner-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .yesdu-pwa-banner-icon-default {
        font-size: 22px;
    }

    .yesdu-pwa-banner-title {
        font-size: 14px;
    }

    .yesdu-pwa-banner-desc {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .yesdu-pwa-banner-actions {
        width: 100%;
        justify-content: stretch;
        margin-top: 4px;
        gap: 8px;
    }

    .yesdu-pwa-banner-install {
        flex: 1;
        padding: 12px 18px;
        font-size: 14px;
    }

    .yesdu-pwa-banner-close {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }

    .yesdu-pwa-banner-text {
        padding-right: 24px;
    }
}

@media (max-width: 400px) {
    .yesdu-pwa-banner-title {
        font-size: 13px;
    }
    .yesdu-pwa-banner-desc {
        display: none;
    }
    .yesdu-pwa-banner-icon {
        width: 42px;
        height: 42px;
    }
    .yesdu-pwa-banner-content {
        padding: 12px 14px;
    }
}

@media (prefers-color-scheme: dark) {
    .yesdu-pwa-banner-content {
        background: #1c1c1e;
        border-color: rgba(255, 255, 255, .08);
        box-shadow:
            0 20px 50px -12px rgba(0, 0, 0, .6),
            0 8px 20px -8px rgba(0, 0, 0, .4);
    }

    .yesdu-pwa-banner-title {
        color: #f5f5f7;
    }

    .yesdu-pwa-banner-desc {
        color: #98989d;
    }

    .yesdu-pwa-banner-icon {
        background: #2c2c2e;
        border-color: #1c1c1e;
    }

    .yesdu-pwa-banner-close {
        color: #8e8e93;
    }

    .yesdu-pwa-banner-close:hover {
        background: #2c2c2e;
        color: #ff453a;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yesdu-pwa-banner-content,
    .yesdu-pwa-banner-install,
    .yesdu-pwa-banner-close {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    .yesdu-pwa-banner-content {
        opacity: 1;
    }
}