/* SourcedWell Main Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1300px;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Forms */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

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

footer h5, footer h6 {
    color: #fff;
    font-weight: 600;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .card {
        margin-bottom: 1rem;
    }
}

/* Custom utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

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

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

/* TomSelect fixes for Bootstrap 5 themes */
.ts-wrapper {
    position: relative;
}

.ts-dropdown {
    background: white !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    z-index: 1050 !important;
}

.ts-dropdown-content {
    background: white !important;
}

.ts-dropdown .option {
    padding: 0.375rem 0.75rem !important;
    color: #212529 !important;
}

.ts-dropdown .option:hover,
.ts-dropdown .option:focus {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.ts-dropdown .option.active {
    background-color: var(--primary-color, #007bff) !important;
    color: white !important;
}

/* Ensure dropdown appears above other elements */
.ts-wrapper .ts-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
}

/* Fix for multi-select tags */
.ts-wrapper.multi .ts-control > div {
    background: var(--primary-color, #007bff) !important;
    color: white !important;
    border-radius: 0.25rem !important;
}

.ts-wrapper.multi .ts-control > div.close {
    background: var(--danger-color, #dc3545) !important;
}

/* Product thumbnails - make them square */
.product_pod .image_container {
    aspect-ratio: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.product_pod .image_container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* Override Oscar's fixed height for product cards */
.product_pod {
    height: auto !important;
}