/* PWA Styles */

/* Converter Icon */
.converter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #6b7280;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.converter-icon:hover {
    background-color: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.converter-icon:active {
    transform: scale(0.95);
}

.converter-icon svg {
    transition: transform 0.3s ease;
}

.converter-icon:hover svg {
    transform: scale(1.1);
}

/* Install button */
.pwa-install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pwa-install-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.pwa-install-btn:active {
    transform: scale(0.95);
}

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

.pwa-install-btn:hover svg {
    transform: scale(1.1);
}

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

/* Tooltip for install button */
.pwa-install-btn {
    position: relative;
}

.pwa-install-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.pwa-install-btn:hover::after {
    opacity: 1;
}

/* Install button animations */
.pwa-install-button {
    transition: all 0.3s ease;
}

.pwa-install-button:hover {
    transform: scale(1.05);
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f56565;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    z-index: 1001;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Update notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #48bb78;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1002;
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* PWA splash screen */
.pwa-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease 2s forwards;
}

.pwa-splash-content {
    text-align: center;
    color: white;
}

.pwa-splash-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.pwa-splash-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.pwa-splash-subtitle {
    font-size: 1rem;
    opacity: 0.8;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* PWA specific styles for standalone mode */
@media (display-mode: standalone) {
    /* Hide browser UI elements when in standalone mode */
    body {
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Add safe area padding for devices with notches */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* PWA loading spinner */
.pwa-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* PWA toast notifications */
.pwa-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1003;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* PWA status bar */
.pwa-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #3b82f6;
    z-index: 1000;
}

/* PWA navigation bar */
.pwa-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.pwa-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.pwa-nav-item.active {
    color: #3b82f6;
}

.pwa-nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

/* Floating install button (FAB) */
.pwa-install-fab {
    position: fixed;
    right: 24px;
    bottom: 80px;
    z-index: 2000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s, transform 0.2s;
    font-size: 1.2rem;
    border: none;
    outline: none;
}
.pwa-install-fab:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transform: scale(1.08);
    background: linear-gradient(135deg, #5a67d8 0%, #6b21a8 100%);
}
.pwa-install-fab:active {
    transform: scale(0.97);
}
.pwa-install-fab svg {
    width: 22px;
    height: 22px;
} 