/**
 * Reading History Modal Styles
 */

.reading-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.history-modal-content {
    background: linear-gradient(135deg, #0a0a14 0%, #1a1624 100%);
    border: 2px solid rgba(176, 163, 215, 0.3);
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(176, 163, 215, 0.1);
}

.history-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid rgba(176, 163, 215, 0.2);
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #0a0a14 0%, #1a1624 100%);
}

.history-modal-header h2 {
    font-size: 1.5rem;
    color: #b0a3d7;
    margin: 0;
    font-family: 'Cinzel', serif;
}

.close-history-btn {
    background: none;
    border: none;
    color: #b0a3d7;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.close-history-btn:hover {
    color: #e8e8e8;
}

.history-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #888;
}

.history-empty p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.history-hint {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.history-items-container {
    padding: 1rem;
}

.reading-history-item {
    background: rgba(176, 163, 215, 0.05);
    border: 1px solid rgba(176, 163, 215, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.reading-history-item:hover {
    background: rgba(176, 163, 215, 0.1);
    border-color: rgba(176, 163, 215, 0.3);
    box-shadow: 0 4px 12px rgba(176, 163, 215, 0.1);
}

.reading-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.reading-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.reading-date {
    font-size: 0.9rem;
    color: #999;
}

.reading-spread {
    font-size: 0.95rem;
    color: #b0a3d7;
    font-weight: 500;
}

.reading-item-actions {
    display: flex;
    gap: 0.5rem;
}

.view-again-btn,
.delete-reading-btn {
    background: rgba(176, 163, 215, 0.15);
    border: 1px solid rgba(176, 163, 215, 0.3);
    color: #b0a3d7;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-again-btn:hover {
    background: rgba(176, 163, 215, 0.3);
    border-color: rgba(176, 163, 215, 0.5);
    color: #e8e8e8;
}

.delete-reading-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
    color: #ff6b6b;
}

.reading-item-intention {
    font-size: 0.95rem;
    color: #b0a3d7;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: rgba(176, 163, 215, 0.08);
    border-radius: 4px;
    border-left: 3px solid #b0a3d7;
}

.reading-item-cards {
    font-size: 0.9rem;
    color: #c0b0d0;
    line-height: 1.5;
}

/* Scrollbar styling */
.history-modal-content::-webkit-scrollbar {
    width: 8px;
}

.history-modal-content::-webkit-scrollbar-track {
    background: rgba(176, 163, 215, 0.05);
}

.history-modal-content::-webkit-scrollbar-thumb {
    background: rgba(176, 163, 215, 0.3);
    border-radius: 4px;
}

.history-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(176, 163, 215, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .reading-history-modal {
        padding: 0;
    }

    .history-modal-content {
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
    }

    .history-modal-header {
        padding: 1rem;
    }

    .history-modal-header h2 {
        font-size: 1.25rem;
    }

    .reading-item-header {
        flex-direction: column;
    }

    .reading-item-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .view-again-btn,
    .delete-reading-btn {
        flex: 1;
        min-width: unset;
    }

    .history-items-container {
        padding: 0.75rem;
    }

    .reading-history-item {
        margin-bottom: 0.75rem;
        padding: 0.75rem;
    }
}
