/**
 * SPU Save Queue Styles
 * Стилі для візуальної індикації стану збереження
 */



/* Анімації */
@keyframes spu-pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes spu-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Текст статусу збереження */
.spu-save-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 9px;
    text-align: center;
    padding: 2px 4px;
    border-radius: 0 0 2px 2px;
    z-index: var(--spu-z-progress);
    pointer-events: none;
    font-weight: 500;
}

/* Індикатор незбереженних змін - рамка навколо мініатюри */
.spu-gallery-item.spu-save-pending {
    border: 2px solid #ffa500 !important;
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.4) !important;
}

.spu-gallery-item.spu-save-saving {
    border: 2px solid #007cba !important;
    box-shadow: 0 0 8px rgba(0, 124, 186, 0.4) !important;
}

.spu-gallery-item.spu-save-saved {
    border: 2px solid #46b450 !important;
    box-shadow: 0 0 8px rgba(70, 180, 80, 0.4) !important;
}

.spu-gallery-item.spu-save-failed {
    border: 2px solid #dc3232 !important;
    box-shadow: 0 0 8px rgba(220, 50, 50, 0.4) !important;
}

/* Індикатор оффлайн режиму */
#spu-offline-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3232;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: var(--spu-z-notifications);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    max-width: 90%;
    word-wrap: break-word;
}

/* Повідомлення про відновлення */
.spu-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border-left: 4px solid #007cba;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    border-radius: 4px;
    z-index: var(--spu-z-notifications);
    max-width: 300px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.spu-notification.spu-notification-visible {
    opacity: 1;
    transform: translateY(0);
}

.spu-notification.spu-notification-error {
    border-left-color: #dc3232;
}

.spu-notification.spu-notification-warning {
    border-left-color: #ffb900;
}

.spu-notification.spu-notification-success {
    border-left-color: #46b450;
}

.spu-notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spu-notification-action,
.spu-retry-button,
.spu-recover-button,
.spu-discard-button {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 8px;
    transition: background-color 0.2s;
}

.spu-notification-action:hover,
.spu-retry-button:hover,
.spu-recover-button:hover {
    background: #005a87;
}

.spu-discard-button {
    background: #dc3232;
}

.spu-discard-button:hover {
    background: #a00;
}

/* Retry повідомлення */
.spu-retry-notification {
    background: #fff;
    border: 1px solid #dc3232;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.spu-retry-notification .spu-notification-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.spu-retry-notification .spu-retry-button {
    align-self: flex-end;
}

/* Recovery повідомлення */
.spu-recovery-notification {
    background: #fff;
    border: 1px solid #ffb900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.spu-notification-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.spu-recovery-notification .spu-notification-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.spu-recovery-notification .spu-notification-content > span {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

/* Адаптивність */
@media (max-width: 768px) {
    #spu-offline-indicator {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
    }

    .spu-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .spu-recovery-notification .spu-notification-content {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .spu-notification-buttons {
        justify-content: flex-end;
    }

    .spu-save-status {
        font-size: 8px;
        padding: 1px 2px;
    }
}