/* static/css/components.css - Reusable Components - Production Ready */

/* ========================================
   QUOTE SYSTEM COMPONENTS
   ======================================== */
.quote-block-clean {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.08), rgba(66, 153, 225, 0.04));
    border-left: 4px solid #4299e1;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
    padding: 0;
    overflow: hidden;
    transition: var(--transition);
}

.quote-block-clean:hover {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.12), rgba(66, 153, 225, 0.06));
    transform: translateX(2px);
}

.quote-header-clean {
    background: rgba(66, 153, 225, 0.1);
    color: #4299e1;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(66, 153, 225, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quote-content-clean {
    padding: 12px 16px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.02);
    position: relative;
}

.quote-content-clean::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: 8px;
    font-size: 2rem;
    color: rgba(66, 153, 225, 0.3);
    font-family: serif;
    font-weight: bold;
}

/* ========================================
   LOADING COMPONENTS
   ======================================== */
.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(229, 62, 62, 0.1);
    border-left: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-dots::after {
    content: '';
    animation: dots 2s infinite;
}

/* ========================================
   BADGE COMPONENTS
   ======================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pinned {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.locked {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.status-badge.featured {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-badge.premium {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 237, 74, 0.2));
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.moderator-badge {
    background: linear-gradient(45deg, var(--warning), #e67e22);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.online-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.online-indicator.online {
    color: var(--success);
}

.online-indicator.offline {
    color: var(--text-muted);
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.online-indicator.online .online-dot {
    animation: pulse-dot 2s infinite;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.underground-toast {
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 8px;
    color: var(--text-light);
    box-shadow: var(--shadow-glow);
    min-width: 300px;
    animation: toastSlideIn 0.3s ease-out;
}

.underground-toast.success {
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(56, 161, 105, 0.3);
}

.underground-toast.warning {
    border-color: var(--warning);
    box-shadow: 0 0 20px rgba(221, 107, 32, 0.3);
}

.underground-toast.danger {
    border-color: var(--danger);
    box-shadow: 0 0 20px rgba(229, 62, 62, 0.3);
}

.underground-toast.info {
    border-color: var(--info);
    box-shadow: 0 0 20px rgba(49, 130, 206, 0.3);
}

.toast-header {
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.toast-body {
    color: var(--text-light);
    padding: 1rem;
}

/* ========================================
   PROGRESS COMPONENTS
   ======================================== */
.underground-progress {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.underground-progress-bar {
    background: linear-gradient(90deg, var(--accent), #c53030);
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.underground-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: progressShine 2s infinite;
}

.underground-progress.success .underground-progress-bar {
    background: linear-gradient(90deg, var(--success), #2d7d32);
}

.underground-progress.warning .underground-progress-bar {
    background: linear-gradient(90deg, var(--warning), #ef6c00);
}

/* ========================================
   CARD VARIANTS
   ======================================== */
.info-card {
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.1), rgba(49, 130, 206, 0.05));
    border: 1px solid rgba(49, 130, 206, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.warning-card {
    background: linear-gradient(135deg, rgba(221, 107, 32, 0.1), rgba(221, 107, 32, 0.05));
    border: 1px solid rgba(221, 107, 32, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.success-card {
    background: linear-gradient(135deg, rgba(56, 161, 105, 0.1), rgba(56, 161, 105, 0.05));
    border: 1px solid rgba(56, 161, 105, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.danger-card {
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.1), rgba(229, 62, 62, 0.05));
    border: 1px solid rgba(229, 62, 62, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   RESPONSIVE COMPONENTS
   ======================================== */
@media (max-width: 768px) {
    .quote-block-clean {
        margin: 12px 0;
    }
    
    .quote-header-clean {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .quote-content-clean {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .toast-container {
        right: 10px;
        left: 10px;
        top: 10px;
    }
    
    .underground-toast {
        min-width: auto;
        width: 100%;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .quote-block-clean:hover,
    .online-indicator.online .online-dot,
    .underground-progress-bar::after {
        animation: none;
    }
    
    .quote-block-clean:hover {
        transform: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .quote-block-clean,
    .underground-toast {
        border-width: 3px;
    }
    
    .status-badge {
        border-width: 2px;
    }
}