/* ===================================
   ORACNOOS - Reading Time Display
   Enhanced reading time badges
   =================================== */

/* ===================================
   Reading Time Badge (Article Meta)
   =================================== */

.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.reading-time-badge i {
    font-size: var(--font-size-base);
}

.reading-time-badge.enhanced {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: var(--shadow-md);
    }
    50% {
        box-shadow: var(--shadow-glow-hover);
    }
}

/* ===================================
   Time Remaining Badge (Sticky)
   =================================== */

.time-remaining-badge {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    box-shadow: var(--shadow-xl);
    z-index: 9995;
    transition: all var(--transition-base);
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.time-remaining-badge i {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
}

/* Reading state */
.time-remaining-badge.reading {
    border-color: rgba(255, 64, 129, 0.4);
}

.time-remaining-badge.reading i {
    color: var(--accent-pink);
    animation: clockTick 1s ease-in-out infinite;
}

@keyframes clockTick {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(10deg);
    }
    75% {
        transform: rotate(-10deg);
    }
}

/* Finished state */
.time-remaining-badge.finished {
    background: var(--gradient-success);
    border-color: #00e676;
    color: white;
}

.time-remaining-badge.finished i {
    color: white;
}

/* ===================================
   Reading Time in Cards
   =================================== */

.reading-time,
.article-reading-time {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.reading-time i,
.article-reading-time i {
    color: var(--primary-color);
}

/* Prominent reading time (hero) */
.reading-time-prominent {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.6rem 1.2rem;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    transition: all var(--transition-base);
}

.reading-time-prominent:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.4);
    transform: scale(1.05);
}

.reading-time-prominent i {
    font-size: var(--font-size-lg);
}

/* ===================================
   Reading Progress Bar (Article)
   =================================== */

.reading-progress-container {
    position: relative;
    margin: var(--spacing-lg) 0;
}

.reading-progress-bar {
    height: 4px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.reading-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.reading-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* ===================================
   Reading Stats Widget (Optional)
   =================================== */

.reading-stats-widget {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    border: 1px solid rgba(0, 229, 255, 0.15);
    margin: var(--spacing-xl) 0;
}

.reading-stats-widget h4 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.reading-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.reading-stat {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(0, 229, 255, 0.05);
    border-radius: var(--radius-md);
}

.reading-stat-value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    display: block;
}

.reading-stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 768px) {
    .time-remaining-badge {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        padding: 0.6rem 1rem;
        font-size: var(--font-size-xs);
    }
    
    .reading-time-prominent {
        padding: 0.5rem 1rem;
        font-size: var(--font-size-sm);
    }
    
    .reading-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .time-remaining-badge {
        display: none; /* Hide on very small screens */
    }
}

/* ===================================
   Dark Mode
   =================================== */

[data-theme="dark"] .time-remaining-badge {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 229, 255, 0.3);
}

/* ===================================
   Print
   =================================== */

@media print {
    .time-remaining-badge,
    .reading-progress-container {
        display: none;
    }
}

