/* Vara API Gateway - Custom Styles */

/* Theme Variables */
:root {
    --vara-primary: #4f46e5;
    --vara-primary-hover: #4338ca;
    --vara-sidebar-bg: #ffffff;
    --vara-sidebar-hover: #f1f5f9;
}

[data-coreui-theme="dark"] {
    --cui-body-bg: #0f172a;
    --cui-card-bg: #1e293b;
    --vara-sidebar-bg: #1e293b;
    --vara-sidebar-hover: #334155;
}

/* Sidebar Customization */
.sidebar {
    background: var(--vara-sidebar-bg);
}

.sidebar-brand {
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-nav .nav-link:hover {
    background: var(--vara-sidebar-hover);
}

.sidebar-nav .nav-link.active {
    background: var(--vara-primary);
}

.sidebar-nav .nav-group-items .nav-link {
    font-size: 0.875rem;
    padding-left: 3rem;
    /* Optional: Increase indentation if needed, but keeping simple for now */
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

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

/* Stats Cards */
.card.bg-primary,
.card.bg-info,
.card.bg-warning,
.card.bg-danger {
    border-radius: 0.5rem;
}

/* Table Improvements */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--cui-secondary-color);
    border-bottom: 2px solid var(--cui-border-color);
}

.table td {
    vertical-align: middle;
}

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

/* Code Styling */
code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

[data-coreui-theme="dark"] code {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Overlay */
.modal.show.d-block {
    animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Toast Styling */
.toast-container {
    z-index: 1100;
}

.toast {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* HTMX Loading Indicator */
.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator {
    display: none;
}

/* Form Improvements */
.form-control:focus,
.form-select:focus {
    border-color: var(--vara-primary);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
}

/* Button Customization */
.btn-primary {
    background-color: var(--vara-primary);
    border-color: var(--vara-primary);
}

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

/* Header */
.header {
    border-bottom: 1px solid var(--cui-border-color);
}

/* Footer */
.footer {
    border-top: 1px solid var(--cui-border-color);
    font-size: 0.875rem;
    padding: 1rem;
}

/* Stat Card Numbers */
.fs-4.fw-semibold {
    font-variant-numeric: tabular-nums;
}

/* Responsive Adjustments */
@media (min-width: 992px) {
    body .sidebar-fixed~.wrapper {
        margin-left: 16rem;
        /* 256px */
        transition: margin-left 0.15s;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        margin-left: -16rem;
    }

    .sidebar-show .sidebar {
        margin-left: 0;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

[data-coreui-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

[data-coreui-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}