/* Custom styles for the inventory management system */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* -----------------------------------------------------------------------------------------
   NAVBAR UI OVERRIDES 
   Fixing the external theme forcing flex-column stacked icons
----------------------------------------------------------------------------------------- */
.navbar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-nav {
    align-items: center !important;
}

.navbar-nav .nav-item {
    margin: 0 0.15rem;
}

.navbar-nav .nav-link {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    padding: 0.6rem 0.8rem !important;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link i {
    margin-right: 0.4rem !important;
    margin-bottom: 0 !important;
    font-size: 1.1rem;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #fff, #a5bdf3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation Marquee for Long Text Strings */
.marquee-nav {
    display: inline-block;
    max-width: 80px; /* Matches visual width of other short nav elements like "Inventory" */
    white-space: nowrap;
    overflow: hidden;
    vertical-align: middle;
}

.marquee-text {
    display: inline-block;
    animation: marquee-scroll 5s linear infinite alternate;
}

/* Pauses the scrolling so user can comfortably read it when mousing over */
.nav-link:hover .marquee-text {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0%, 15% { transform: translateX(0); }
    85%, 100% { transform: translateX(calc(-100% + 80px)); }
}

/* Icon-only button styling */
.btn-icon-only {
    padding: 0.25rem !important;
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Prevent icons from being selectable or focusable */
.pointer-events-none {
    pointer-events: none;
}

/* Focus styles for barcode inputs */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Animation for mode change */
@keyframes highlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.mode-change {
    animation: highlight 0.5s ease;
}

/* Toast notifications */
.toast {
    max-width: 350px;
}

/* Styling for the timeout indicators */
.badge.bg-info, .badge.bg-warning {
    font-family: monospace;
    font-size: 0.85rem;
}

/* Make the barcode input more prominent */
#employee-barcode-input, #inventory-barcode-input {
    font-family: monospace;
    letter-spacing: 1px;
}

/* Styling for the activity log table */
.table {
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
}

/* Make sure the notifications appear above everything else */
#notifications-container {
    z-index: 9999;
}

/* Search dropdown styling */
.search-dropdown {
    position: absolute;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    background: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
}

.search-dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--bs-border-color);
}

.search-dropdown-item:hover, 
.search-dropdown-item:focus {
    background-color: var(--bs-primary);
    color: white;
}

.search-dropdown-item .item-id {
    font-weight: bold;
    display: inline-block;
    min-width: 80px;
}

.search-dropdown-item .item-details {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.search-input-container {
    position: relative;
}

.search-input {
    border-radius: 0.25rem;
    padding: 0.5rem;
    width: 100%;
    background-color: var(--bs-dark);
    color: var(--bs-light);
    border: 1px solid var(--bs-border-color);
}

.search-input:focus {
    border-color: var(--bs-primary);
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.hover-underline:hover {
    text-decoration: underline !important;
}
