/* ==========================================
   PWA Install Banners
   ========================================== */

/* ------------------------------------------
   DESKTOP + iOS : Mini info bar (bottom)
   ------------------------------------------ */
#pwa-install-banner,
#pwa-ios-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #ffffff;
    border-top: 3px solid #059669;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    padding: 12px 16px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#pwa-install-banner.pwa-banner-visible,
#pwa-ios-banner.pwa-banner-visible {
    transform: translateY(0);
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.pwa-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pwa-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pwa-banner-text strong {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.pwa-banner-text span {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.pwa-btn-install {
    background: #059669;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.pwa-btn-install:hover {
    background: #047857;
}

.pwa-btn-install:active {
    background: #065f46;
}

.pwa-btn-dismiss {
    background: none;
    border: none;
    font-size: 24px;
    color: #bbb;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.pwa-btn-dismiss:hover {
    color: #555;
}

/* iOS banner - allow text wrap for instructions */
#pwa-ios-banner .pwa-banner-text span {
    white-space: normal;
    line-height: 1.4;
}

/* Desktop: offset for sidebar */
@media (min-width: 1024px) {
    #pwa-install-banner,
    #pwa-ios-banner {
        left: 80px;
    }
}

/* ------------------------------------------
   ANDROID : Material bottom sheet
   ------------------------------------------ */
#pwa-android-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    padding: 0 20px 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#pwa-android-banner.pwa-android-visible {
    transform: translateY(0);
}

/* Drag handle */
.pwa-android-handle {
    width: 36px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto 16px;
}

/* Header row: icon + name + close */
.pwa-android-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.pwa-android-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.pwa-android-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pwa-android-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.pwa-android-url {
    font-size: 13px;
    color: #888;
}

.pwa-android-close {
    background: none;
    border: none;
    font-size: 26px;
    color: #bbb;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    flex-shrink: 0;
}

.pwa-android-close:hover {
    color: #555;
}

/* Description */
.pwa-android-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 18px;
}

/* Full-width install button */
.pwa-android-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
    letter-spacing: 0.3px;
}

.pwa-android-btn:hover {
    background: #047857;
}

.pwa-android-btn:active {
    background: #065f46;
}

/* ------------------------------------------
   Small screens adjustments
   ------------------------------------------ */
@media (max-width: 480px) {
    #pwa-install-banner,
    #pwa-ios-banner {
        padding: 10px 12px;
    }

    .pwa-banner-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .pwa-btn-install {
        padding: 6px 16px;
        font-size: 13px;
    }

    #pwa-android-banner {
        padding: 0 16px 20px;
    }
}
