/* css/styles.css */

/* Customize filter section */
.filters {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Style the form controls */
.filters .form-select,
.filters .form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding-right: 2.5rem; /* Space for dropdown indicators */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4L2 0zM2 5L0 3h4L2 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 8px 10px;
}

/* Remove default Select2 arrow and customize */
.select2-container .select2-selection--multiple {
    min-height: 38px;
    padding: 5px 12px;
    border-radius: 0.375rem;
    background-color: #fff;
    border: 1px solid #ced4da;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #667eea;
    border: none;
    color: #fff;
    border-radius: 15px;
    padding: 2px 8px;
    margin-top: 2px;
    margin-right: 2px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-left: 5px;
    cursor: pointer;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ccc;
}

/* Style the form labels */
.filters .form-label {
    font-weight: bold;
    color: #333;
}

/* Style the primary button */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Style the dataset view button */
.btn-outline-primary {
    color: #667eea;
    border-color: #667eea;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* Style the table */
.table-responsive {
    margin-top: 20px;
}

.table-dark th {
    background-color: #2d3748;
    color: white;
}

.table-hover tbody tr:hover {
    background-color: #edf2f7;
}

/* Footer styling */
footer {
    background-color: #2d3748;
    color: white;
}

footer a {
    color: #63b3ed;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Loading Spinner Positioning */
#loading {
    display: none;
}

/* Custom Slider Styles */
.ui-slider-horizontal {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    border: 1px solid #cbd5e0;
}

.ui-slider-handle {
    background: #667eea;
    border: none;
    width: 20px;
    height: 20px;
    top: -6px;
    border-radius: 50%;
    cursor: pointer;
}

.ui-slider-range {
    background: #667eea;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .filters .row {
        flex-direction: column;
    }

    .filters .row > div {
        width: 100%;
    }
}

/* Ensure the form-select has an arrow indicator */
.select2-container--default .select2-selection--single {
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

/* Blurb Text Styling */
.mb-4 h2 {
    color: #2d3748;
}

.mb-4 p {
    font-size: 1rem;
}

.mb-4 p.text-muted {
    font-size: 0.9rem;
    font-style: italic;
}


/* Hide the remove icon in Select2 selected items */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    display: none;
}

/* Style the table in the search results */
.table {
    background-color: #fff;
    border-radius: 0.375rem;
    overflow: hidden;
}

.table th,
.table td {
    vertical-align: middle;
}

.table thead th {
    background-color: #667eea;
    color: #fff;
    border: none;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f7fafc;
}

.table-hover tbody tr:hover {
    background-color: #e2e8f0;
}

.table td a.btn {
    border-radius: 0.375rem;
}

/* Ensure table responsiveness */
.table-responsive {
    margin-top: 20px;
    border-radius: 0.375rem;
    overflow: hidden;
}


/* Style for card view */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    flex: 1 1 calc(100% - 40px); 
    max-width: calc(100% - 40px);
	border-radius: 0.6rem;
} 

@media (min-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 40px); 
        max-width: calc(50% - 0px);
    }
}

@media (min-width: 992px) {
    .card {
        flex: 1 1 calc(33.333% - 40px); 
        max-width: calc(33.333% - 0px);
    }
}

.card-header {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
}

.card-body p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.card-body a.btn {
    margin-top: 10px;
}

#loading {
    display: flex;
    justify-content: center;
    align-items: center;
}
