/* PWA Install Button Styles */

/* Floating Install Button */
.pwa-install-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.4);
    transition: all 0.3s ease;
    animation: pwa-pulse 2s infinite;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(22, 163, 74, 0.5);
}

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

.pwa-install-btn .pwa-icon {
    font-size: 20px;
}

.pwa-install-btn.visible {
    display: flex;
}

@keyframes pwa-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(22, 163, 74, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(22, 163, 74, 0.6);
    }
}

/* Desktop positioning adjustment */
@media (min-width: 768px) {
    .pwa-install-btn {
        bottom: 30px;
        right: 30px;
    }
}

/* PWA Install Modal/Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: white;
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: none;
}

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

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

.pwa-install-banner-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-install-banner-icon .material-icons {
    color: white;
    font-size: 28px;
}

.pwa-install-banner-text {
    flex: 1;
}

.pwa-install-banner-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.pwa-install-banner-subtitle {
    font-size: 13px;
    color: #6b7280;
}

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

.pwa-install-banner-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.pwa-install-banner-btn.primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.pwa-install-banner-btn.primary:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
}

.pwa-install-banner-btn.secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.pwa-install-banner-btn.secondary:hover {
    background: #e5e7eb;
}

/* Dark mode support */
.dark .pwa-install-banner {
    background: #1f2937;
}

.dark .pwa-install-banner-title {
    color: #f9fafb;
}

.dark .pwa-install-banner-subtitle {
    color: #9ca3af;
}

.dark .pwa-install-banner-btn.secondary {
    background: #374151;
    color: #d1d5db;
}

.dark .pwa-install-banner-btn.secondary:hover {
    background: #4b5563;
}

/* iOS Install Instructions Modal */
.pwa-ios-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: 20px;
}

.pwa-ios-modal.visible {
    display: flex;
}

.pwa-ios-modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    animation: pwa-modal-enter 0.3s ease;
}

@keyframes pwa-modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pwa-ios-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.pwa-ios-modal-icon .material-icons {
    color: white;
    font-size: 36px;
}

.pwa-ios-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.pwa-ios-modal-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.pwa-ios-steps {
    text-align: left;
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.pwa-ios-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.pwa-ios-step:last-child {
    margin-bottom: 0;
}

.pwa-ios-step-num {
    width: 24px;
    height: 24px;
    background: #16a34a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.pwa-ios-step-text {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.pwa-ios-step-text .material-icons {
    font-size: 16px;
    vertical-align: middle;
    color: #6b7280;
}

.pwa-ios-modal-close {
    width: 100%;
    padding: 12px;
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pwa-ios-modal-close:hover {
    background: #e5e7eb;
}

/* Dark mode for iOS modal */
.dark .pwa-ios-modal-content {
    background: #1f2937;
}

.dark .pwa-ios-modal-title {
    color: #f9fafb;
}

.dark .pwa-ios-modal-subtitle {
    color: #9ca3af;
}

.dark .pwa-ios-steps {
    background: #374151;
}

.dark .pwa-ios-step-text {
    color: #d1d5db;
}

.dark .pwa-ios-step-text .material-icons {
    color: #9ca3af;
}

.dark .pwa-ios-modal-close {
    background: #374151;
    color: #d1d5db;
}

.dark .pwa-ios-modal-close:hover {
    background: #4b5563;
}

/* Installed indicator */
.pwa-installed-badge {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9998;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: pwa-badge-fade 0.3s ease;
}

.pwa-installed-badge.visible {
    display: flex;
}

.pwa-installed-badge .material-icons {
    font-size: 16px;
}

@keyframes pwa-badge-fade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dark .pwa-installed-badge {
    background: #064e3b;
    color: #6ee7b7;
}
