/* Search History Page Styles */

/* Page Header */
.page-header {
    margin-top: 2rem;
}

.page-header h1 {
    color: var(--primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Stats Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-plan {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-dark);
    font-weight: 500;
    margin: 0;
    opacity: 0.8;
}

/* Actions Bar */
.actions-bar {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.actions-bar h5 {
    color: var(--primary);
    font-weight: 600;
}

/* Search History Container */
.search-history-container {
    min-height: 400px;
}

/* History Item */
.history-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

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

.history-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

.history-date {
    color: var(--text-dark);
    opacity: 0.7;
    font-size: 0.9rem;
}

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

.history-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Search Details */
.search-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-detail {
    background: rgba(240, 248, 255, 0.5);
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.search-detail-label {
    font-size: 0.8rem;
    color: var(--text-dark);
    opacity: 0.7;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-detail-value {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Results Summary */
.results-summary {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.results-summary h6 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.results-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-stat i {
    color: var(--primary);
    opacity: 0.7;
}

.result-stat span {
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* Upgrade Prompt */
.upgrade-prompt {
    background: linear-gradient(135deg, rgba(11, 0, 87, 0.05) 0%, rgba(76, 111, 255, 0.05) 100%);
    border-radius: var(--border-radius);
}

.upgrade-prompt .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary);
}

.upgrade-prompt h4 {
    color: var(--primary);
    font-weight: 600;
}

/* Loading and Empty States */
#loading-state .spinner-border {
    width: 3rem;
    height: 3rem;
}

#empty-state i {
    opacity: 0.5;
}

#empty-state h4 {
    color: var(--text-dark);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-number, .stat-plan {
        font-size: 2rem;
    }
    
    .search-details {
        grid-template-columns: 1fr;
    }
    
    .history-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .history-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .actions-bar .text-end {
        text-align: left !important;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .history-item {
        padding: 1rem;
    }
    
    .search-detail {
        padding: 0.5rem;
    }
}

/* Animation for new items */
.history-item {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delete confirmation */
.delete-confirmation {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.delete-confirmation .btn {
    margin-right: 0.5rem;
}

/* Search again button highlight */
.btn-search-again {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-search-again:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 0, 87, 0.3);
}

/* Pro badge styling */
.pro-badge {
    background: linear-gradient(135deg, var(--accent) 0%, #ffd700 100%);
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
