/* Custom styles for eBay Baseball Cards Tracker */

body {
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

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

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    height: 2.4rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #28a745;
}

.condition-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.listing-type {
    font-size: 0.8rem;
    color: #6c757d;
}

.location {
    font-size: 0.8rem;
    color: #6c757d;
}

.bid-count {
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 600;
}

.category-filter {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.category-filter:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.category-filter.active {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.category-filter .card-body {
    padding: 0.75rem;
    text-align: center;
}

.category-filter .card-title {
    font-size: 0.8rem;
    margin-bottom: 0;
    height: auto;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.item-details {
    margin-top: 1rem;
}

.item-details .row {
    margin-bottom: 0.5rem;
}

.item-details .col-4 {
    font-weight: 600;
    color: #6c757d;
}

.item-details .col-8 {
    color: #212529;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-img-top {
        height: 150px;
    }
    
    .card-title {
        font-size: 0.8rem;
        height: 2rem;
    }
    
    .price {
        font-size: 1rem;
    }
}

/* Animation for card loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 

/* Comparables section styles */
#comparablesResults .card {
    border-left: 4px solid #28a745;
}

#comparablesResults .card-title {
    color: #28a745;
    font-weight: 600;
}

.sale-details .text-success {
    font-weight: bold;
}

#comparablesResults .btn-outline-primary:hover {
    background-color: #28a745;
    border-color: #28a745;
}

/* Comparables loading spinner */
#comparablesResults .spinner-border.text-success {
    color: #28a745;
}

/* Table styles */
.table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.table tbody td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Tab styles */
.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #495057;
}

.nav-tabs .nav-link.active {
    border-bottom-color: #007bff;
    color: #007bff;
    background-color: transparent;
}

/* Badge improvements */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Button improvements for table */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table-img {
        width: 40px;
        height: 40px;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
}

/* Combined view styles */
#combinedTableBody tr:not(:first-child) td:first-child {
    border-left: 3px solid #e9ecef;
}

#combinedTableBody tr:first-child td:first-child {
    border-left: 3px solid #007bff;
}

.table-primary thead th {
    background-color: #cfe2ff;
    color: #084298;
    border-color: #9ec5fe;
}

/* Indentation for comparable rows */
#combinedTableBody tr td:first-child .text-muted {
    padding-left: 1rem;
}

/* Hover effects for combined view */
#combinedTableBody tr:hover {
    background-color: #f8f9fa;
}

#combinedTableBody tr:hover td:first-child {
    border-left-color: #007bff;
}

/* Price flag badge styles */
.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
    font-weight: 600;
}

.badge.bg-success {
    background-color: #198754 !important;
    color: white !important;
    font-weight: 600;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
    font-weight: 600;
}

/* Average price column styling */
.text-info.fw-bold {
    color: #0dcaf0 !important;
    font-weight: 700 !important;
} 