/* Vidyallm PWA Install Styles */
/* Beautiful, non-intrusive install prompts and buttons */

/* Landing page install hint - smaller and more elegant */
.pwa-install-hint {
    background: linear-gradient(135deg, #10a37f 0%, #0d8f70 100%);
    color: white;
    padding: 8px 16px;
    margin: 8px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(16, 163, 127, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: slideInFromTop 0.5s ease-out;
    font-size: 13px;
}

.install-hint-content {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.install-icon {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.install-text {
    flex: 1;
    font-weight: 500;
    font-size: 12px;
    min-width: 160px;
}

.install-btn-subtle {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.install-btn-subtle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Floating install button */
.pwa-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: bounceIn 0.6s ease-out;
}

.floating-install-btn {
    background: linear-gradient(135deg, #10a37f 0%, #0d8f70 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 163, 127, 0.25);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-install-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(16, 163, 127, 0.4);
    background: linear-gradient(135deg, #0d8f70 0%, #0a7a60 100%);
}

.floating-install-btn svg {
    transition: transform 0.3s ease;
}

.floating-install-btn:hover svg {
    transform: translateY(-2px);
}

/* Navigation install button */
.nav-install-btn {
    background: linear-gradient(135deg, #10a37f 0%, #0d8f70 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    margin-left: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.2);
}

.nav-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3);
    background: linear-gradient(135deg, #0d8f70 0%, #0a7a60 100%);
}

/* Install modal */
.pwa-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.pwa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pwa-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideInFromBottom 0.4s ease-out;
    border: 1px solid rgba(16, 163, 127, 0.1);
}

.pwa-modal-content.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.pwa-modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pwa-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.pwa-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.pwa-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

.pwa-modal-body {
    padding: 18px 20px;
}

.pwa-modal-body p {
    margin: 0 0 16px 0;
    color: #374151;
    line-height: 1.6;
    font-size: 15px;
}

.pwa-benefits {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.pwa-benefits li {
    padding: 6px 0;
    color: #374151;
    font-size: 14px;
    position: relative;
    padding-left: 24px;
}

.pwa-benefits li:before {
    content: attr(data-emoji);
    position: absolute;
    left: 0;
    top: 6px;
}

.pwa-modal-actions {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.pwa-install-yes {
    background: linear-gradient(135deg, #10a37f 0%, #0d8f70 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.25);
}

.pwa-install-yes:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 163, 127, 0.35);
    background: linear-gradient(135deg, #0d8f70 0%, #0a7a60 100%);
}

.pwa-install-later, .pwa-success-ok {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pwa-install-later:hover, .pwa-success-ok:hover {
    background: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
}

/* Success modal specific styles */
.pwa-success-modal .pwa-modal-content {
    border: 2px solid #22c55e;
    box-shadow: 0 20px 60px rgba(34, 197, 94, 0.2);
}

.pwa-success-modal .pwa-modal-header {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-bottom-color: rgba(34, 197, 94, 0.1);
}

.pwa-success-modal .pwa-modal-header h3 {
    color: #15803d;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pwa-floating-btn {
        bottom: 90px; /* Above mobile navigation */
        right: 16px;
    }
    
    .floating-install-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .floating-install-btn span {
        display: none; /* Only show icon on mobile */
    }
    
    .pwa-modal-overlay {
        padding: 16px;
    }
    
    .pwa-modal-content {
        max-width: 100%;
        margin: 0;
    }
    
    .pwa-modal-actions {
        flex-direction: column-reverse;
    }
    
    .pwa-install-yes, .pwa-install-later, .pwa-success-ok {
        width: 100%;
        justify-content: center;
    }
    
    .install-hint-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .install-text {
        min-width: auto;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pwa-install-hint {
        border: 2px solid white;
    }
    
    .floating-install-btn {
        border: 3px solid white;
    }
    
    .pwa-modal-content {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pwa-install-hint,
    .pwa-floating-btn,
    .pwa-install-modal,
    .pwa-modal-content {
        animation: none;
    }
    
    .floating-install-btn:hover,
    .install-btn-subtle:hover,
    .nav-install-btn:hover,
    .pwa-install-yes:hover,
    .pwa-install-later:hover {
        transform: none;
    }
}

/* Focus styles for accessibility */
.install-btn-subtle:focus,
.floating-install-btn:focus,
.nav-install-btn:focus,
.pwa-install-yes:focus,
.pwa-install-later:focus,
.pwa-success-ok:focus {
    outline: 2px solid #10a37f;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pwa-modal-content {
        background: #1e293b;
        color: #f1f5f9;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .pwa-modal-header {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .pwa-modal-header h3 {
        color: #f1f5f9;
    }
    
    .pwa-modal-close {
        color: #94a3b8;
    }
    
    .pwa-modal-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f1f5f9;
    }
    
    .pwa-modal-body p {
        color: #e2e8f0;
    }
    
    .pwa-benefits {
        background: #334155;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .pwa-benefits li {
        color: #e2e8f0;
    }
    
    .pwa-install-later {
        background: #374151;
        color: #d1d5db;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .pwa-install-later:hover {
        background: #4b5563;
        color: #f3f4f6;
    }
} 