/* Custom styles for TCG Price Tracker */

/* Search form enhancements */
.search-form-container {
    width: 100%;
}

.search-form-container .input-group {
    width: 100%;
}

.search-form-container .form-control {
    flex: 1;
    min-width: 0;
}

/* View toggle buttons */
.btn-group .btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-group .btn-outline-secondary.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* List view table styling */
#listView .table {
    background-color: white;
}

#listView .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

#listView .table th {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

/* Dark mode support for list view */
[data-bs-theme="dark"] #listView .table {
    background-color: var(--bs-dark);
    color: var(--bs-light);
}

[data-bs-theme="dark"] #listView .table th {
    background-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] #listView .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.product-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    background-color: #f8f9fa;
}

.price-badge {
    font-size: 1.2em;
    font-weight: 600;
    padding: 0.5em 0.75em;
}

.chart-btn {
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.chart-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: white !important;
}

.delete-btn {
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

.collection-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.stats-item {
    text-align: center;
}

.stats-value {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.search-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
}

.search-card .card-title {
    color: white;
    font-weight: 600;
}

.search-card .form-control:focus {
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .card-img-top {
        height: 200px;
    }
    
    .stats-value {
        font-size: 1.5rem;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    /* Stack view toggle buttons on mobile */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 2px;
    }
}

/* Print styles */
@media print {
    .navbar, .btn, .modal {
        display: none !important;
    }
    
    .product-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    #cardView {
        display: none !important;
    }
    
    #listView {
        display: block !important;
    }
}
