/* === Base Styles === */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    color: #000;
    background-color: #f9f9f9;
    margin: 0;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

h1 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  text-align: center;
  line-height: 1.4;
}

h2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  text-align: center;
  line-height: 1.4;
}

h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

h5 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

p {
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 15px auto;
  color: #333;
}

@media (max-width: 576px) {
  h1 { font-size: 16px; }
  h2 { font-size: 14px; }
  p  { font-size: 12.5px; }
}


/* === Layout === */
.page-wrapper {
    display: flex;
    gap: 20px;
    min-height: 100vh; /* Ensure the container has full height for sticky behavior */
}

.page-wrapper aside {
    position: -webkit-sticky; /* For better cross-browser support */
    position: sticky;
    top: 45px;
    width: 10%; /* Adjust sidebar width to be 20% instead of 8% */
    min-width: 180px; /* Ensure the sidebar doesn't shrink below 180px */
    padding: 10px;
    background-color: #f8f8f8; /* Ensures visibility */
    z-index: 100;
    flex-shrink: 0; /* Prevent shrinking */
    
    height: 100%; /* Ensure full height for sticky to work */
    overflow-y: auto; /* Allow vertical scrolling in case of overflow */
}

.content, .page-wrapper main {
    flex: 1;
    min-width: 0;
    padding: 5px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

footer {
    margin-top: auto;
    padding: 10px 0;
    font-size: 12px;
    text-align: center;
}


/* ======= Navbar used as top navigation ========= */

nav.navbar {
  z-index: 1040;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Top nav styled like breadcrumb */
nav.navbar ul.nav.breadcrumb {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center; /* Center items inside */
  align-items: center;
  padding: 1px 0;
  margin: 0 auto; /* Horizontally center */
  font-size: 14px;
  list-style: none;
  background: none;
}

/* Nav items */
nav.navbar .nav-item {
  display: flex;
  align-items: center;
}

/* Links */
nav.navbar .nav-link {
  color: #007bff;
  text-decoration: none;
  padding: 0 5px;
}

/* Add separator "›" between nav items */
nav.navbar .nav-item + .nav-item::before {
  content: "›";
  margin: 0 0px;
  color: #6c757d;
  font-weight: normal;
}

/* Hover effect */
nav.navbar .nav-link:hover {
  text-decoration: underline;
}

/* Optional: style current page link */
nav.navbar .nav-link.active {
  color: #6c757d;
  font-weight: 500;
}

.breadcrumb .nav-link {
  font-size: 0.85rem;
}


/* === DataTable === */

/* Style the DataTables filter container */
.dataTables_wrapper .dataTables_filter {
  width: 99.5%;
  margin-bottom: 1rem;
  text-align: left; /* Ensure label aligns left */
}

/* Style the label */
.dataTables_wrapper .dataTables_filter label {
  width: 99.5%;
  display: block;
  font-size: .8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #212529; /* Bootstrap's body text color */
}

/* Style the input */
.dataTables_wrapper .dataTables_filter input {
  width: 99.5%;
  padding: 0.5rem .75rem;
  font-size: 1rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background-color: #fff;
  transition: border-color 0.2s ease-in-out;
}

/* Focus style */
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}


/* === Filters === */
.filter-fieldset {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.5em;
    padding: 0.4em 0.6em;
    display: block;
    vertical-align: top;
    background-color: #fff;
    border: 1px solid #000;
    box-sizing: border-box;
}

.filter-fieldset legend {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 0.25em;
    padding: 0 5px;
}

.filter-fieldset label {
    display: inline-block;
    font-size: 12px;
    margin-bottom: 4px;
    cursor: pointer;
}

.filter-fieldset select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.filter-fieldset select option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reset-filter {
    float: right;
    font-size: 13px;
    color: red;
    cursor: pointer;
}

/* === Table === */
#partsTable {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-family: sans-serif;
    font-size: 14px;
    margin-bottom: 30px;
}

#partsTable thead {
    background-color: #f5f5f5;
}

#partsTable th,
#partsTable td {
    padding: 6px 8px;
    border: 1px solid #ddd;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#partsTable tr:nth-child(even) {
    background-color: #fafafa;
}

#partsTable tr:hover {
    background-color: #f0f8ff;
}

@media (max-width: 992px) {
  .page-wrapper {
    flex-direction: column;
  }

  .page-wrapper aside {
    position: static; /* Remove sticky on mobile */
    width: 100%;
    max-height: none; /* Allow natural height */
    overflow: visible;
    margin-bottom: 15px; /* Space before main */
  }

  .page-wrapper .content {
    width: 100%;
  }
}


@media (max-width: 768px) {
    #partsTable colgroup col:nth-child(3) {
        width: 25%;
    }
    #partsTable {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    #partsTable colgroup col:nth-child(3) {
        width: 20%;
    }
    #partsTable th,
    #partsTable td {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        gap: 0;
        min-height: auto;
        flex-direction: column; /* Optional: stack vertically on small screens */
    }
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-left: 5px;
    color: #007bff;
}

.copy-btn:hover {
    color: #fff;
}

/* Optional: Slight bottom margin for better spacing on mobile */
@media (max-width: 767px) {
    #mobileFilters {
        margin-bottom: 1rem;
    }
}

.toggle-details-content {
    font-size: .9rem; /* Increase or decrease as needed */
}

/* NEW PHP CODE STYLES */



/* EMAIL SENDING MESSAGE CSS*/

.alert {
  margin-bottom: 1rem;
}
main {
  padding-top: 80px; /* adjust as needed */
}

.alert {
  margin-bottom: 1rem;
}
