/* AKWG Operations Support - Custom Styles */

body {
    overflow-x: hidden;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    min-height: 100vh;
    width: 280px;
    z-index: 1000;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.sidebar nav {
    overflow-y: auto;
    flex: 1;
}

.sidebar.collapsed {
    margin-left: -280px;
}

.main-content {
    margin-left: 280px;
    transition: all 0.3s;
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: 0;
}

.logo {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
    border-radius: 0.5rem;
}

.logo-img {
    max-height: 100%;
    max-width: calc(100% - 2rem);
    object-fit: contain;
    width: auto;
    height: auto;
}

.nav-link.active {
    background-color: var(--bs-primary);
    color: var(--bs-white) !important;
    border-radius: 0.375rem;
}

/* Subdued styling for submenu active items */
.collapse .nav .nav-link.active {
    background-color: transparent;
    color: var(--bs-primary) !important;
    font-weight: 500;
    border: 1px solid var(--bs-border-color);
    border-left: 3px solid var(--bs-primary);
    border-radius: 0.375rem;
    padding-left: calc(var(--bs-nav-link-padding-x) - 2px);
}

.collapse .nav .nav-link {
    border: 1px solid transparent;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        margin-left: -280px;
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }

    .sidebar.show {
        margin-left: 0;
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Card hover effects - disabled wiggle */
.card {
    transition: none;
    transform: none;
}

.card:hover {
    transition: none;
    transform: none;
}

/* Table improvements */
.table th {
    border-top: none;
    font-weight: 600;
}

/* Remove table background striping in cards */
.card .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: transparent;
}

/* Button improvements - disable focus/hover wiggle effects */
.btn {
    border-radius: 0.375rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
    transform: none !important;
}

.btn:hover,
.btn:focus,
.btn:active,
.btn:focus-visible {
    transform: none !important;
    animation: none !important;
}

/* Remove wiggle from nav links */
.nav-link {
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
    transform: none !important;
}

.nav-link:hover,
.nav-link:focus,
.nav-link:active {
    transform: none !important;
    animation: none !important;
}

/* Remove wiggle from form controls */
.form-control,
.form-select,
.form-check-input {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transform: none !important;
}

.form-control:hover,
.form-control:focus,
.form-select:hover,
.form-select:focus,
.form-check-input:hover,
.form-check-input:focus {
    transform: none !important;
    animation: none !important;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--bs-border-color);
    border-radius: 3px;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dark mode specific styles */
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-gray-800) !important;
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .bg-light .text-muted {
    color: var(--bs-gray-400) !important;
}

[data-bs-theme="dark"] .bg-light .table {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .bg-light .fw-semibold {
    color: var(--bs-body-color);
}