
/* Sidenav for menu */
.sidenav {
  background-color: #f8f9fa;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - 180px);
  padding-top: 20px;
  font-size: 10px;
  border-right: 1px solid #dee2e6;
  box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

/* Style the sidenav links and the dropdown button */
.sidenav a, .sidenav .dropdown-btn {
  padding: 10px 12px;
  text-decoration: none;
  font-size: 13px !important;
  color: #333;
  display: block;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  border-radius: 4px;
  margin: 2px 8px;
  width: calc(100% - 16px);
}

/* On mouse-over */
.sidenav a:hover, .sidenav .dropdown-btn:hover {
  background-color: #e8f4f8;
  color: #0066cc;
  padding-left: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Style for the dropdown container */
.dropdown-container {
  display: none;
  background-color: rgba(0,0,0,0.02);
  padding-left: 8px;
  border-left: 2px solid #dee2e6;
  margin-left: 12px;
}

/* Add a transition for a smooth open/close effect */
.dropdown-container.show {
  display: block;
}

/* Remove bullets from menu lists */
.menu-list, .submenu {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.submenu {
  padding-left: 15px;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Menu item styling */
.menu-item {
  list-style-type: none;
  margin-bottom: 2px;
  position: relative;
}

/* Make links position relative and create a positioning context */
.menu-item > a {
  position: relative;
  padding-right: 30px; /* Make room for the caret */
}

/* Top level menu items with bold text */
.menu-list > .menu-item > a {
  font-weight: 600;
  color: #2c3e50;
}

/* Submenu items - slightly smaller and lighter */
.submenu .menu-item > a {
  font-size: 12px !important;
  color: #546e7a;
  padding: 8px 12px;
}

.submenu .submenu .menu-item > a {
  font-size: 11px !important;
  color: #78909c;
  padding: 7px 12px;
}

/* Caret icon */
.caret {
  user-select: none; /* Prevent text selection */
  cursor: pointer;
  position: absolute;
  right: 14px;
  top: 10px; /* Fixed position from top */
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.caret::before {
  content: "▶";
  color: #2c3e50;
  display: inline-block;
  transition: transform 0.3s ease, color 0.2s ease;
  font-size: 12px;
  font-weight: bold;
}

/* Hover effect on caret */
.menu-item:hover > .caret::before {
  color: #0066cc;
}

/* Hide submenus by default */
.submenu {
  display: none;
}

/* Show submenu when parent has 'open' class */
.menu-item.open > .submenu {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Rotate caret when the menu is open */
.menu-item.open > .caret::before {
  transform: rotate(90deg);
  color: #0066cc;
}

/* Shopping Cart Title */
.cart-title {
  font-size: 16px;
  color: #2c3e50;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0066cc;
  text-align: left;
}

/* Style for the cart table */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Cart table header */
.cart-table thead {
  background-color: #2c3e50;
  color: white;
}

.cart-table thead th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  border: 1px solid #1a252f;
}

/* Cart table body cells */
.cart-table tbody td {
  padding: 10px 8px;
  border: 1px solid #dee2e6;
  vertical-align: middle;
}

/* Add zebra-striping to cart table for better readability */
.cart-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.cart-table tbody tr:hover {
  background-color: #e8f4f8;
  transition: background-color 0.2s ease;
}

/* Cart table footer (totals row) */
.cart-table tfoot {
  background-color: #f8f9fa;
  font-weight: bold;
}

.cart-table tfoot td {
  padding: 12px 8px;
  border: 2px solid #dee2e6;
  font-size: 13px;
}

/* Style for the trashcan icon button in the cart */
.cart-delete-btn {
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2em;
  color: #666;
  padding: 2px 6px;
  transition: all 0.2s ease;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.cart-delete-btn:hover {
  background-color: #d9534f;
  color: white;
  border-color: #d43f3a;
  transform: scale(1.15);
}

/* Add some margin to the company logo in the top bar */
.company-logo {
  margin-right: 20px;
}

/* Style for the "Clear Cart" button */
.clear-cart-btn {
    padding: 10px 16px;
    background-color: #dc3545;
    color: white;
    border: 1px solid #bd2130;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.clear-cart-btn:hover:not([disabled]) {
    background-color: #c82333;
    border-color: #bd2130;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.clear-cart-btn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Style for the "Order" button */
.checkout-btn {
    padding: 10px 16px;
    background-color: #28a745;
    color: white;
    border: 1px solid #218838;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.checkout-btn:hover:not([disabled]) {
    background-color: #218838;
    border-color: #1e7e34;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.checkout-btn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}