/**
 * PWA Install Banner Styles
 * Sticky top banner for install prompt
 */

/* =====================================================
   Sticky Install Banner
   ===================================================== */
.pwa-install-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

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

.pwa-install-banner__content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pwa-install-banner__icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    background: #fff;
    object-fit: cover;
}

.pwa-install-banner__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-install-banner__text strong {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-banner__text span {
    font-size: 12px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.pwa-install-banner__button:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

.pwa-install-banner__button:active {
    transform: scale(0.98);
}

.pwa-install-banner__close {
    background: transparent;
    border: none;
    color: #fff;
    padding: 4px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-install-banner__close:hover {
    opacity: 1;
}

/* =====================================================
   iOS Install Instructions Modal
   ===================================================== */
.pwa-ios-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.pwa-ios-prompt__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pwa-ios-prompt__dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 320px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: pwa-ios-slide-up 0.3s ease;
}

@keyframes pwa-ios-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-ios-prompt__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.pwa-ios-prompt__close:hover {
    background: #e0e0e0;
    color: #333;
}

.pwa-ios-prompt__dialog h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.pwa-ios-prompt__dialog p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #666;
}

.pwa-ios-prompt__dialog ol {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: decimal;
}

.pwa-ios-prompt__dialog ol li {
    padding: 8px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.pwa-ios-prompt__dialog ol li:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* =====================================================
   Responsive Adjustments
   ===================================================== */
@media (max-width: 480px) {
    .pwa-install-banner {
        padding: 10px 12px;
    }
    
    .pwa-install-banner__icon {
        width: 36px;
        height: 36px;
    }
    
    .pwa-install-banner__text strong {
        font-size: 13px;
    }
    
    .pwa-install-banner__text span {
        font-size: 11px;
    }
    
    .pwa-install-banner__button {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* =====================================================
   Hide banner when app is installed (standalone mode)
   ===================================================== */
@media (display-mode: standalone) {
    .pwa-install-banner {
        display: none !important;
    }
}

/* =====================================================
   Admin bar adjustment
   ===================================================== */
.admin-bar .pwa-install-banner {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .pwa-install-banner {
        top: 46px;
    }
}

/* =====================================================
   Shortcode Button
   ===================================================== */
.pwa-install-shortcode-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-install-shortcode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pwa-install-shortcode-btn:active {
    transform: translateY(0);
}
