/* css/offline.css - PointRWRDS Offline Detection Styles */

/* Network Status Indicator */
.network-status {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00c851;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.network-status.online {
    background: #00c851;
    box-shadow: 0 0 0 3px rgba(0, 200, 81, 0.2);
}

.network-status.offline {
    background: #ff4444;
    animation: pulse-offline 2s infinite;
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.2);
}

@keyframes pulse-offline {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Offline Notification */
.offline-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(255, 68, 68, 0.3);
    z-index: 10000;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.offline-notification.offline-show {
    transform: translateX(-50%) translateY(0);
}

.offline-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.offline-icon {
    font-size: 18px;
    filter: grayscale(1);
}

.offline-text {
    flex: 1;
    min-width: 150px;
}

.offline-retry-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.offline-retry-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Reconnected Notification */
.reconnected-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: linear-gradient(135deg, #00c851, #28a745);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 200, 81, 0.3);
    z-index: 10000;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    max-width: 90%;
    width: 350px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reconnected-notification.reconnected-show {
    transform: translateX(-50%) translateY(0);
}

.reconnected-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.reconnected-icon {
    font-size: 18px;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

/* Error Notification */
.error-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #333;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.3);
    z-index: 9999;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.error-notification.error-show {
    transform: translateX(-50%) translateY(0);
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.error-icon {
    font-size: 18px;
}

.error-text {
    flex: 1;
    text-align: left;
}

.error-close-btn {
    background: rgba(51, 51, 51, 0.2);
    border: none;
    color: #333;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-close-btn:hover {
    background: rgba(51, 51, 51, 0.3);
    transform: scale(1.1);
}

/* Enhanced Loading Overlay States */
.offline-loading-content,
.timeout-loading-content {
    text-align: center;
    color: white;
    max-width: 300px;
}

.offline-loading-icon,
.timeout-loading-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.offline-loading-content h3,
.timeout-loading-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

.offline-loading-content p,
.timeout-loading-content p {
    font-size: 16px;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.5;
}

.offline-retry-button,
.timeout-retry-button,
.timeout-cancel-button {
    background: linear-gradient(135deg, #ffba00, #ffd800);
    color: #333;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin: 0 6px;
}

.offline-retry-button:hover,
.timeout-retry-button:hover {
    background: linear-gradient(135deg, #ffd800, #ffba00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 186, 0, 0.4);
}

.timeout-cancel-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.timeout-cancel-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.timeout-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .offline-notification,
    .reconnected-notification,
    .error-notification {
        top: 15px;
        left: 15px;
        right: 15px;
        width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .offline-notification.offline-show,
    .reconnected-notification.reconnected-show,
    .error-notification.error-show {
        transform: translateY(0);
    }
    
    .network-status {
        top: 10px;
        right: 10px;
        width: 10px;
        height: 10px;
    }
    
    .offline-content,
    .reconnected-content,
    .error-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .offline-retry-btn {
        width: 100%;
        padding: 8px 12px;
    }
    
    .error-text {
        text-align: center;
    }
    
    .offline-loading-content h3,
    .timeout-loading-content h3 {
        font-size: 20px;
    }
    
    .offline-loading-content p,
    .timeout-loading-content p {
        font-size: 14px;
    }
    
    .offline-retry-button,
    .timeout-retry-button,
    .timeout-cancel-button {
        width: 100%;
        margin: 6px 0;
        justify-content: center;
    }
    
    .timeout-actions {
        flex-direction: column;
        width: 100%;
    }
}

/* Tablet Optimizations */
@media (min-width: 481px) and (max-width: 768px) {
    .offline-notification,
    .reconnected-notification,
    .error-notification {
        width: 450px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .offline-notification,
    .reconnected-notification,
    .error-notification {
        border-width: 2px;
        box-shadow: none;
    }
    
    .network-status {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .offline-notification,
    .reconnected-notification,
    .error-notification,
    .network-status {
        animation: none !important;
        transition: opacity 0.2s ease !important;
    }
    
    .offline-loading-icon,
    .timeout-loading-icon,
    .reconnected-icon {
        animation: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .error-notification {
        background: linear-gradient(135deg, #f39c12, #e67e22);
    }
    
    .offline-retry-button,
    .timeout-retry-button {
        background: linear-gradient(135deg, #f39c12, #e67e22);
    }
}