/* Professional iOS-Style PWA Installation Modal */

.pwa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.pwa-modal-container {
    width: 100%;
    max-width: 340px;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-modal {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pwa-modal-icon {
    padding: 32px 24px 16px;
    display: flex;
    justify-content: center;
}

.pwa-icon-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pwa-icon-circle svg {
    width: 32px;
    height: 32px;
    color: white;
    stroke-width: 2.5;
}

.pwa-modal-content {
    padding: 16px 24px 24px;
    text-align: center;
}

.pwa-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.pwa-modal-message {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    margin: 0;
}

.pwa-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px 16px;
}

.pwa-modal-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.pwa-modal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.pwa-modal-btn:active::before {
    width: 300px;
    height: 300px;
}

.pwa-modal-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.pwa-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pwa-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.pwa-modal-btn-primary:active {
    transform: translateY(0);
}

.pwa-modal-btn-secondary {
    background: #f5f5f5;
    color: #666666;
}

.pwa-modal-btn-secondary:hover {
    background: #e8e8e8;
}

.pwa-modal-btn-secondary:active {
    background: #d8d8d8;
}

/* Floating Install Button Wrapper */
.pwa-floating-install-wrapper {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    animation: slideUpFade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Navigation Install Button */
.pwa-nav-install-btn {
    position: relative;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-nav-install-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.pwa-nav-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pwa-nav-install-btn:active {
    transform: translateY(0);
}

.pwa-nav-install-btn.installed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    pointer-events: none;
}

.pwa-nav-install-btn.installed svg {
    animation: checkmark 0.5s ease-out;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .pwa-modal-overlay {
        padding: 16px;
    }

    .pwa-modal-container {
        max-width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pwa-modal {
        background: #2d2d2d;
    }

    .pwa-modal-title {
        color: #ffffff;
    }

    .pwa-modal-message {
        color: #cccccc;
    }

    .pwa-modal-btn-secondary {
        background: #3d3d3d;
        color: #cccccc;
    }

    .pwa-modal-btn-secondary:hover {
        background: #4d4d4d;
    }
}
