/* Custom variables */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* Global styles */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background-color: #f8f9fa;
}

/* Header styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 600;
}

/* Card styles */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    border: none;
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Button styles */
.btn {
    font-weight: 500;
    padding: .5rem 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Form styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Table styles */
.table {
    background-color: white;
    border-radius: .25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.table thead th {
    border-top: none;
    background-color: #f8f9fa;
}

/* Alert styles */
.alert {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

/* Badge styles */
.badge {
    font-weight: 500;
    padding: .5em .8em;
}

/* Footer styles */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    background-color: white;
    box-shadow: 0 -2px 4px rgba(0,0,0,.05);
}

/* Utility classes */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,.05) !important;
}

.shadow {
    box-shadow: 0 4px 6px rgba(0,0,0,.1) !important;
}

/* Status indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-active {
    background-color: var(--success-color);
}

.status-inactive {
    background-color: var(--danger-color);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Loading spinner */
.loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* Code display */
code {
    background-color: #f8f9fa;
    padding: .2rem .4rem;
    border-radius: .25rem;
    color: var(--primary-color);
}

/* Feature cards */
.feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-card .btn {
    margin-top: auto;
}

/* Autocomplete suggestions styling */
.autocomplete-suggestions {
    position: absolute;
    z-index: 9999999; /* Very high z-index to ensure it's above everything */
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0 0 0.25rem 0.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    top: 100%; /* Position below the input */
    left: 0;
    margin-top: 0;
}

/* Fix for autocomplete dropdown being hidden behind tabs */
.position-relative .autocomplete-suggestions,
body > .autocomplete-suggestions {
    z-index: 9999999; /* Even higher z-index */
}

/* Ensure the autocomplete suggestions stay on top when hovered */
.autocomplete-suggestions:hover {
    z-index: 9999999;
}

/* Ensure the container for the search input has proper positioning */
.position-relative {
    position: relative !important;
    z-index: 9000; /* High z-index for the container */
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    z-index: 9999999 !important;
}

.autocomplete-item:hover,
.autocomplete-item:focus {
    background-color: #f8f9fa;
    z-index: 9999999 !important;
    position: relative !important;
    pointer-events: auto !important;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-loading,
.autocomplete-error,
.autocomplete-no-results {
    padding: 0.75rem 1rem;
    text-align: center;
    color: #6c757d;
}

/* Fix for input group positioning */
.input-group {
    position: relative;
}
