/**
 * CorePlus PWA Styles
 */

/* Installatie knop */
#pwa-install-button {
    background-color: #0073aa;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

#pwa-install-button:hover {
    background-color: #005d8b;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

#pwa-install-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#pwa-install-button::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='7 10 12 15 17 10'%3E%3C/polyline%3E%3Cline x1='12' y1='15' x2='12' y2='3'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Status indicator */
#pwa-online-status {
    font-size: 12px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

/* Update notification */
#pwa-update-notification {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    0% { transform: translate(-50%, 100%); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

#pwa-update-button {
    margin-left: 10px;
    padding: 6px 12px;
    background: white;
    color: #4CAF50;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: background-color 0.2s;
}

#pwa-update-button:hover {
    background-color: #f5f5f5;
}

/* Offline mode indications */
.offline-mode {
    opacity: 0.7;
    pointer-events: none;
}

.offline-notice {
    background-color: #f44336;
    color: white;
    text-align: center;
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* A11y improvements */
#pwa-install-button:focus,
#pwa-update-button:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #pwa-install-button {
        background-color: #2271b1;
    }
    
    #pwa-install-button:hover {
        background-color: #135e96;
    }
    
    #pwa-update-button {
        background-color: #f0f0f0;
    }
    
    #pwa-update-button:hover {
        background-color: #e0e0e0;
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    #pwa-install-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    #pwa-update-notification {
        padding: 10px 16px;
        font-size: 13px;
    }
}