/**
 * Recent Questions Additional Styles
 * Version: 1.0.0
 * 
 * Additional styling for the Recent Questions page
 * This file contains styles that may be needed for specific customizations
 */

/* Animation for question cards when they load */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card {
    animation: slideInUp 0.3s ease-out;
}

/* Staggered animation for multiple cards */
.question-card:nth-child(1) { animation-delay: 0.1s; }
.question-card:nth-child(2) { animation-delay: 0.2s; }
.question-card:nth-child(3) { animation-delay: 0.3s; }
.question-card:nth-child(4) { animation-delay: 0.4s; }
.question-card:nth-child(5) { animation-delay: 0.5s; }

/* Enhanced hover effects for cards */
.question-card:hover .mini-card {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Custom scrollbar for mini-cards container */
.question-cards::-webkit-scrollbar {
    height: 4px;
}

.question-cards::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.question-cards::-webkit-scrollbar-thumb {
    background: #4ECDC4;
    border-radius: 2px;
}

.question-cards::-webkit-scrollbar-thumb:hover {
    background: #3a8a85;
}

/* Print styles */
@media print {
    .refresh-container,
    .question-actions {
        display: none !important;
    }
    
    .question-card {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .question-card {
        border: 2px solid #000;
    }
    
    .question-type {
        background: #000 !important;
        color: #fff !important;
    }
    
    .action-btn {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .action-btn.primary {
        background: #000;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .question-card {
        animation: none;
    }
    
    .question-card:hover {
        transform: none;
    }
    
    .loading-spinner {
        animation: none;
    }
    
    .action-btn,
    .refresh-btn {
        transition: none;
    }
}

/* Focus styles for better accessibility */
.action-btn:focus,
.refresh-btn:focus {
    outline: 2px solid #4ECDC4;
    outline-offset: 2px;
}

.question-card:focus-within {
    box-shadow: 0 0 0 2px #4ECDC4;
}

/* Custom styles for specific question types */
.question-type[style*="FF6B6B"] {
    /* Love & Relationships - Red */
    position: relative;
}

.question-type[style*="4ECDC4"] {
    /* Career & Work - Teal */
    position: relative;
}

.question-type[style*="FFE66D"] {
    /* Money & Finance - Yellow */
    position: relative;
}

/* Error state styles */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.error-state .error-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #D9534F;
}

.error-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.error-state p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Dark mode error state */
body.dark-mode .error-state h3 {
    color: #e0e0e0;
}

body.dark-mode .error-state p {
    color: #a0a0a0;
}

/* Loading state enhancements */
.loading-container p {
    margin-top: 10px;
    font-style: italic;
}

/* Badge styles for question types */
.question-type::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.question-card:hover .question-type::after {
    opacity: 1;
}

/* Responsive enhancements */
@media (max-width: 320px) {
    .question-text {
        font-size: 14px;
    }
    
    .question-answer {
        font-size: 12px;
    }
    
    .mini-card {
        width: 25px;
        height: 37px;
    }
    
    .mini-card-name {
        font-size: 5px;
    }
}

/* Additional styles for improved recent questions display */
.question-answer {
    line-height: 1.6;
    color: var(--text-secondary);
}

.question-answer p {
    margin: 0 0 8px 0;
}

.question-answer strong {
    font-weight: 600;
    color: var(--text-primary);
}

.question-answer em {
    font-style: italic;
}

.view-more-btn {
    background: none;
    border: none;
    color: var(--primary-color, #6366f1);
    cursor: pointer;
    font-size: 14px;
    padding: 8px 0;
    text-decoration: underline;
    margin-top: 8px;
    transition: opacity 0.2s ease;
}

.view-more-btn:hover {
    text-decoration: none !important;
    opacity: 0.8;
}

.mini-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 40px;
    height: 60px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.mini-card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-size: 8px;
    padding: 2px 4px;
    text-align: center;
    border-radius: 0 0 4px 4px;
    line-height: 1;
}

.question-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
}

/* Loading state improvements */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color, #6366f1);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Better action button styling */
.action-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.action-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color, #6366f1);
}

.action-btn.primary {
    background: var(--primary-color, #6366f1);
    color: white;
    border-color: var(--primary-color, #6366f1);
}

.action-btn.primary:hover {
    background: var(--primary-dark, #4f46e5);
}

.question-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Timestamp improvements */
.question-timestamp {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Better error state styling */
.refresh-btn {
    background: var(--primary-color, #6366f1);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s ease;
}

.refresh-btn:hover {
    background: var(--primary-dark, #4f46e5);
}

/* Empty state improvements */
#empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

#empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 18px;
}

/* Responsive improvements for mobile */
@media (max-width: 768px) {
    .question-card {
        margin-bottom: 16px;
    }
    
    .question-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .mini-card {
        width: 35px;
        height: 50px;
    }
    
    .mini-card-name {
        font-size: 7px !important;
    }
} 