/* static/css/base.min.css */

/* Autocomple styling */

/* Force jQuery UI menu to shrink to content size */
.ui-autocomplete.ui-front {
    width: auto !important;
    min-width: 150px !important;
    max-width: 600px !important;
    white-space: nowrap;
    background-color: white;
    border: 1px solid #ccc;
    z-index: 9999 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Improve individual item look */
.ui-menu-item-wrapper {
    padding: 6px 12px;
    cursor: pointer;
}

/* Hover effect */
.ui-menu-item-wrapper:hover {
    background-color: #f0f0f0;
}

.ui-autocomplete {
    list-style-type: none;  /* Remove bullets */
    padding-left: 0;        /* Remove left indent */
    margin: 0;              /* Remove top/bottom spacing */
}


/* Container for top bar */
#burger_btn_cntnr{
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:fixed;
  top:0;
  width:100%;
  z-index:1000;
  padding:5px 10px;
}


/* Left section styles */
.left-section {
  display: flex;
  align-items: center;
  gap: 15px; /* space between burger button and page title */
}

/* Right section styles */
.right-section {
  display: flex;
  align-items: center;
  gap: 15px; /* space between notification icon and language selector */
}

/* Notification Container (wraps bell & dropdown) */
.notification-container {
  position: relative;
  display: inline-block;
  margin-right: 20px;
  overflow: visible;    /* ← allow dropdown to overflow */
}

.notification-text {
  color: #333;
  background-color: #7FFFD4;  /* Light gray background */
  padding: 8px 12px;
  border-radius: 4px;
  text-align: center;
}

/* Bell Icon */
.notification-bell {
  font-size: 21px !important;
  cursor: pointer;
  color: white;
}

/* Notification Count Badge */
.notification-count {
    pointer-events: none;
    position: absolute;
    top: -12px;
    right: -15px;
    background: #ADFF2F;
    color: #000000;
    border-radius: 50%;
    padding: 4px 4px;
    font-size: 10px;
    min-width: 20px;
    text-align: center;
    line-height: 1;
    display: none;
}

.notification-dropdown {
  display: none;        /* hidden by default */
  position: absolute;
  top: 100%;            /* right under the bell */
  right: 0;             /* align to container’s right edge */
  background: #fff;
  list-style: none;
  padding: 10px;
  margin: 4px 0 0;
  width: auto;          /* size to content */
  min-width: 200px;
  max-width: 300px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 4px;
  z-index: 1000;
  max-height: 50vh;
  overflow-y: auto;
}

@media (max-width: 600px) {
  .notification-dropdown {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 95vw;
    min-width: unset;
    max-width: unset;
  }
}

/* Notification Items: Separated and text wrapping enabled */
.notification-dropdown li {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    word-wrap: break-word;   /* Ensures long messages wrap */
    transition: background-color 0.2s ease, border-radius 0.2s ease;
}

/* Remove border from last item */
.notification-dropdown li:last-child {
    border-bottom: none;
}

/* Links within notifications: Make them block-level for full clickable area */
.notification-dropdown li a {
    color: #333;
    text-decoration: none;
    display: block;
    white-space: normal;     /* Allow wrapping */
    line-height: 1.4;
}

/* Hover effect: Change background color and add rounded corners */
.notification-dropdown li:hover {
    background-color: #f0f2f5; /* A light grey similar to Facebook's hover effect */
    border-radius: 8px;
    cursor: pointer;
}

/*----------------------------------------------------------------*/
/* Keep banner above everything */
.cc-window { z-index: 2147483647 !important; }

/* Desktop: allow bottom-right float from JS init */
@media (min-width: 769px) {
  body.cc-banner-open { padding-bottom: 0; }
}

/* Mobile: make it a full-width bottom bar that fits the screen */
@media (max-width: 768px) {
  body.cc-banner-open { padding-bottom: 64px; } /* reserve space */

  .cc-window {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
  }

  /* Tidy text and buttons on one line where possible */
  .cc-message { margin: 8px 10px !important; }
  .cc-compliance {
    display: flex !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    flex-wrap: nowrap !important;
  }
  .cc-compliance .cc-btn { flex: 1 1 auto !important; }
}

/* Hide CookieConsent revoke button everywhere */
.cc-revoke { display: none !important; }


html, body {
  overflow-x: hidden;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;              /* Use slightly smaller radius */
    overflow: hidden;
    background-color: #fff;           /* Ensure clean background */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);  /* Soft shadow */
}

/* Rounded corners on top headers */
.table thead th:first-child {
    border-top-left-radius: 12px;
}
.table thead th:last-child {
    border-top-right-radius: 12px;
}

/* Rounded corners on bottom row */
.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}
.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Optional: subtle row hover effect */
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Optional: subtle border to define table edges */
.table-bordered {
    border: 1px solid #dee2e6;
}

/* Optional: softer cell borders */
.table-bordered td,
.table-bordered th {
    border: 1px solid #e0e0e0;
}

.table th, .table td {
    border: 1px solid #dee2e6 !important; /* Set the border color for the table headers and cells */
}

thead {
    background-color: #343a40;
    color: #fff;
}



/* For all LOOONG product descriptions to be hiden  */
.product-description {
    max-width: 200px; /* Adjust as needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* highlith cell in select_inbound_products.html */
.low-stock {
    background-color: #f8d7da; /* A light red background color */
    color: #721c24; /* A darker red text color */
}

/* Navigation highlight */
.w3-bar-item.active {
    background-color: #f0f0f0; /* Light gray or any color for highlight */
    color: #007bff; /* Blue or any color for text highlight */
}

/* Styles for the question-icon */
.question-icon {
    font-size: 18px; /* Ensure visibility */
    color: #007bff; /* Icon color */
    margin-left: 8px; /* Consistent spacing from text */
    vertical-align: middle; /* Align with text */
    display: inline-block; /* Ensure it remains visible */
    cursor: pointer;
}

h1 {
    overflow: visible; /* Prevent clipping of the icon */
    white-space: nowrap; /* Ensure text and icon stay on the same line */
    line-height: 1.5; /* Sufficient space for icons and text */
}

@media (max-width: 768px) {
    .question-icon {
        font-size: 16px; /* Slightly smaller for mobile */
        margin-left: 5px; /* Adjust spacing */
    }
}

.column-item {
    display: inline-block; /* Or flex, depending on your layout */
    margin-right: 10px; /* Adjust spacing to your preference */
    /* Add more styling as needed */
}

.form-check-inline:last-child {
    margin: 0;
}

/*forms labels bold style*/
form .form-group label {
    font-weight: bold;
}

.btn {
    margin-top: 0.1rem;
}


/* buttons in product.html inline */
.btn-group-flex {
    display: flex;
    align-items: center; /* This aligns the buttons vertically in the center if their heights are different */
    gap: 0.5rem; /* This adds some space between your buttons */
}

/* fonts */
div h1, h2, h3 {
    font-family: 'Chau Philomene One', sans-serif;
}

:root { --topbar-h: 64px; }           /* fallback before JS runs */
#burger_btn_cntnr { z-index: 1040; }  /* keep ribbon above */
body { padding-top: var(--topbar-h); }

main {
    margin: auto;
}

#history_bdy td:hover {
    background-color: yellow;
}

table {
    width: 100%;
    margin-top: 10px;
}

table th, table td {
    text-align: center;
    vertical-align: middle;
}

/* smaller screen */

@media (min-width: 1580px) {

main {
    margin-left: 16em;
    }
#nav_close_btn {
    display: none;
    }
}

#local-time {
    font-size: 1.5rem;
}

.small-date {
    text-align: center; /* This ensures the text within this div is also centered if it doesn't fill the full width of the div */
}

/* Stock count setup styles*/

.locations-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Adjusts the space between checkboxes */
}

.form-check .form-check-input {
    margin-left: 1em !important;
}

td.product-description, td.truncated {
        max-width: 200px; /* Constrain width */
        white-space: nowrap; /* Prevent text wrapping */
        overflow: hidden; /* Hide overflowing content */
        text-overflow: ellipsis; /* Add ellipsis for truncated text */
    }

@media (max-width: 990px) {
    /* Hide the table on small screens */
    #mass_inb_tbl, #mass_outb_tbl {
        display: none;
    }
    /* Show the mobile forms on small screens */
    .mobile-forms {
        display: block;
    }
}

/* General styles for all pages */

/* Base font size for mobile */
@media (max-width: 768px) {
    body {
        font-size: 12px;
    }

    .table th, .table td {
        padding: 0.3rem !important;
    }

    .table td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    h1, h5 {
        font-size: 18px;
    }

    p {
        font-size: 14px;
    }

    /* Buttons */
    .btn {
        font-size: 12px;
        padding: 0.4rem 0.6rem;
    }

    /* Tables */
    .table {
        font-size: 12px;
        width: 100%;
        table-layout: auto;
    }

    .question-icon {
        color: white; /* Icon color */
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Modals */
    .modal-content {
        font-size: 14px;
        padding: 1rem;
    }

    .modal-title {
        font-size: 16px;
    }

    /* Alerts and messages */
    .alert {
        font-size: 14px;
        padding: 0.5rem;
    }

    /* No records found */
    .no-products-found, .no-records-found {
        font-size: 14px;
        padding: 10px;
        border-radius: 5px;
        text-align: center;
    }
    td.product-description, td.truncated {
        max-width: 100px; /* Constrain width */
        white-space: nowrap; /* Prevent text wrapping */
        overflow: hidden; /* Hide overflowing content */
        text-overflow: ellipsis; /* Add ellipsis for truncated text */
    }
}


#mySidebar a {
    text-decoration: none;
}

#mySidebar {
    width: 16em !important;
}

.w3-sidebar ul {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.w3-sidebar .w3-bar-item {
    border-left: 8px solid #1d1d1d !important;
}

#productsSubmenu .w3-bar-item, #movementsSubmenu .w3-bar-item{
    border-left: 8px solid #3f51b5 !important;
}

.w3-sidebar .w3-bar-item:hover {
    border-left: 8px solid #3f51b5 !important;
}

#productsSubmenu .w3-bar-item:hover, #movementsSubmenu .w3-bar-item:hover{
    border-left: 0px solid #3f51b5;
}

#productsSubmenu, #movementsSubmenu {
    background-color: #3f51b5;
}

/* For warehouse dropdown similar to products and movements */
#warehouseSubmenu .w3-bar-item {
    border-left: 8px solid #3f51b5 !important; /* Same border color as others */
}

#warehouseSubmenu {
    background-color: #3f51b5; /* Same background color as others */
}

/* On hover, remove the border */
#warehouseSubmenu .w3-bar-item:hover {
    border-left: 0px solid #3f51b5;
}



@media (max-width: 1580px) {
    #mySidebar {
        display: none;
        width: 70% !important;
    }
}

#burger_btn {
    /* margin-right: 10em; Removed to use justify-content instead */
}

#filename {
    display: none; /* Hide by default */
    color: #fff; /* Adjust color as needed */
    /* Any additional styling for the filename */
}

#back_btn {
    display: none !important;
    margin-right: 1em;
}

#burger_btn_cntnr span {
    font-size: 1em;
}

#page_title {
    display: none;
}

@media (max-width: 1024px) {
    #back_btn {
        display:block !important;
    }

    h1 {
    display: none;
    }

    #filename {
        display: block; /* Show on smaller screens */
        flex-grow: 1; /* Allows the filename to take up space for centering */
        text-align: center; /* Center the text */
    }

    #page_title {
        display: block;
}
}

.footer {
    background-color: #f8f9fa; /* Light grey background */
    color: #6c757d; /* Slightly dark grey text for contrast */
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #e7e7e7; /* A subtle border at the top */
}

.footer a {
    color: #007bff; /* Bootstrap primary blue for links */
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.container.text-center {
    max-width: 80%;
    margin: auto;
}

/* Dashboard stat cards */
.cards-container{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:16px;
  margin:16px 0;
}

.card.card-stat{
  text-decoration:none;
  color:inherit;
  border:1px solid #e9ecef;
  border-radius:16px;
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  background:#fff;
}

.card.card-stat .card-body{
  padding:16px 18px;
}

.card.card-stat:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 18px rgba(0,0,0,0.10);
  border-color:#dfe3e8;
}

.card.card-stat .stat-label{
  margin:0 0 6px 0;
  font-weight:600;
  opacity:.8;
}

.card.card-stat .stat-value{
  margin:0;
  font-size:1.4rem;
  font-weight:700;
  line-height:1.2;
}

/* Ensure links inside cards don’t get underlined on hover */
.card.card-stat a{ text-decoration:none; }

