/**
 * PWA (Progressive Web App) Styles for Mehrara Dental Clinic
 * Styles for install banners, notifications, and app-like features
 */

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4753BF 0%, #6366f1 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(71, 83, 191, 0.3);
    z-index: 9999;
    font-family: 'DM Sans', sans-serif;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease-out;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-banner-icon img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-text strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.pwa-banner-text p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

.pwa-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* PWA Buttons */
.pwa-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.pwa-btn-primary {
    background: white;
    color: #4753BF;
}

.pwa-btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.pwa-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pwa-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pwa-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* PWA Install Button in Navigation */
.pwa-install-btn {
    background: linear-gradient(135deg, #4753BF 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(71, 83, 191, 0.3);
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(71, 83, 191, 0.4);
}

.pwa-install-item {
    margin-left: 15px;
}

/* PWA Notifications */
.pwa-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    font-family: 'DM Sans', sans-serif;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.pwa-notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pwa-notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.pwa-notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Notification Types */
.pwa-notification-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.pwa-notification-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.pwa-notification-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.pwa-notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Offline Notification */
.pwa-offline-notification {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    top: auto;
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: none;
}

/* Update Notification */
.pwa-update-notification {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

/* PWA Installed State */
.pwa-installed .pwa-install-banner,
.pwa-installed .pwa-install-btn {
    display: none !important;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pwa-install-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .pwa-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .pwa-banner-actions {
        width: 100%;
        justify-content: center;
    }
    
    .pwa-btn {
        flex: 1;
        min-width: 80px;
    }
    
    .pwa-notification {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
    
    .pwa-offline-notification {
        bottom: 10px;
    }
    
    .pwa-install-item {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .pwa-banner-text strong {
        font-size: 14px;
    }
    
    .pwa-banner-text p {
        font-size: 12px;
    }
    
    .pwa-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .pwa-btn-primary {
        background: #1f2937;
        color: white;
    }
    
    .pwa-btn-primary:hover {
        background: #374151;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .pwa-install-banner {
        border: 2px solid white;
    }
    
    .pwa-btn {
        border: 1px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .pwa-install-banner,
    .pwa-notification {
        animation: none;
    }
    
    .pwa-btn,
    .pwa-install-btn {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .pwa-install-banner,
    .pwa-notification,
    .pwa-install-btn {
        display: none !important;
    }
}