/* Custom styles for Amazon AU Tracker */

/* Global overrides */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.125);
}

.card-header {
    background-colour: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.125);
}

/* Tables */
.table-responsive {
    border-radius: 0.375rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

canvas {
    border-radius: 0.375rem;
}

/* Delta indicators */
.delta-positive {
    colour: #198754 !important;
}

.delta-negative {
    colour: #dc3545 !important;
}

.delta-neutral {
    color: #6c757d !important;
}

/* Product images */
.product-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.product-image-lg {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
}

.btn-group-sm > .btn {
    font-size: 0.75rem;
}

/* Calculator specific styles */
.fee-breakdown {
    font-size: 0.875rem;
}

.fee-breakdown > div {
    padding: 0.25rem 0;
}

/* Hot products */
.hot-product-card {
    transition: transform 0.2s ease-in-out;
}

.hot-product-card:hover {
    transform: translateY(-2px);
}

/* Dashboard stats */
.stats-card {
    text-align: center;
    padding: 1.5rem;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-sm > .btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert adjustments */
.alert {
    border-radius: 0.5rem;
}

/* Badge styles */
.badge {
    font-weight: 500;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Utility classes */
.text-truncate-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.border-dashed {
    border-style: dashed !important;
}

.bg-pattern {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Dark theme specific adjustments */
[data-bs-theme="dark"] {
    --bs-body-bg: #0d1117;
    --bs-border-color: #30363d;
}

[data-bs-theme="dark"] .card {
    background-color: #161b22;
    border-color: #30363d;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
}

[data-bs-theme="dark"] .table-dark {
    --bs-table-bg: #21262d;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #21262d !important;
}

/* Animation for chart loading */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.chart-loading {
    animation: pulse 1.5s ease-in-out infinite;
}
