/* =============================================================================
   STATUS & STATE COMPONENTS
   ============================================================================= */

.status-badge {
    display: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem 0 0;
    animation: slideInFromRight 0.3s ease-out;
}

.status-badge.is-visible {
    display: block;
}

.status-badge.is-hiding {
    animation: slideOutToRight 0.3s ease-out forwards;
}

.status-badge--offline {
    background: rgba(255, 152, 0, 0.9);
}

.status-badge--online {
    background: rgba(76, 175, 80, 0.9);
}

.status-badge--caching {
    background: rgba(33, 150, 243, 0.9);
}

.status-badge--failed {
    background: rgba(244, 67, 54, 0.9);
}

.status-badge__content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-badge__text {
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #666;
}

.loading__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #666;
    text-align: center;
}

.error--search {
    color: #d32f2f;
    padding: 1rem;
    font-style: italic;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem 3rem 2rem;
    color: #666;
    text-align: center;
    width: 100%;
    margin: 0 auto;
    grid-column: 1 / -1; /* Span all grid columns */
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0 0 2rem 0;
    color: #555;
}

.empty-state .retry-btn {
    background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
    color: white;
    padding: 0.875rem 2.5rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 280px;
    white-space: nowrap;
}

.empty-state .retry-btn:hover {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
    transform: translateY(-2px);
}

.empty-state .retry-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
}

/* Update Notification Component */
.update-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #2E7D32;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInUp 0.3s ease-out;
}

.update-notification__message {
    flex: 1;
    line-height: 1.4;
}

.update-notification__message-detail {
    opacity: 0.9;
    font-size: 0.85rem;
}

.update-notification__btn {
    background: rgba(255,255,255,0.9);
    color: #2E7D32;
    font-weight: 600;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.update-notification__btn:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.update-notification__dismiss {
    background: transparent;
    color: rgba(255,255,255,0.8);
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.update-notification__dismiss:hover {
    background: rgba(255,255,255,0.1);
}

/* Update status messages */
.update-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: #333;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10001;
    animation: fadeIn 0.3s ease-out;
}

.update-status--checking {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
}

.update-status--success {
    background: #E8F5E8;
    border-left: 4px solid #4CAF50;
}

.update-status--error {
    background: #FFEBEE;
    border-left: 4px solid #F44336;
}

/* Mobile responsive styles for empty state */
@media (max-width: 480px) {
    .empty-state {
        padding: 3rem 1.5rem 2rem 1.5rem;
    }
    
    .empty-state p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .empty-state .retry-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-width: 260px;
        border-radius: 1.5rem;
    }
}

/* Mobile responsive styles for update notification */
@media (max-width: 480px) {
    .update-notification {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .update-notification__message {
        text-align: center;
        margin-bottom: 0;
    }
    
    .update-notification__btn {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        font-weight: 700;
    }
    
    .update-notification__dismiss {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        margin-left: 0;
    }
}