html {
  letter-spacing: -0.25px;
  font-size: 0.935em;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-family: "Quicksand", sans-serif;
}

a.link {
  color: #8a5a44;
  border-bottom: #b87333 0.05em solid;
  transition: all 0.2s ease;
}

a:hover,
a:focus {
  color: #6b3e26;
  background-position: 100% 0%;
}

a:hover::after,
a:focus::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Consolidated active state */
a:active {
  background-color: rgba(138, 90, 68, 0.1);
  transform: scale(0.98);
  opacity: 0.8;
  transition: all 0.1s ease;
}

.breadcrumb a {
  color: black;
}

.breadcrumb a:hover {
  color: black;
}

.breadcrumb {
  --bulma-breadcrumb-item-active-color: black;
}

.is-underlined {
  text-decoration-color: #ddd !important;
}

@font-face {
  font-family: 'fontello';
  src: url('/font/fontello.eot?249361');
  src:
    url('/font/fontello.eot?249361#iefix') format('embedded-opentype'),
    url('/font/fontello.woff?249361') format('woff'),
    url('/font/fontello.ttf?249361') format('truetype'),
    url('/font/fontello.svg?249361#fontello') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.demo-icon {
  font-family: fontello, serif;
  font-style: normal;
  font-weight: normal;
  display: inline-block;
  text-decoration: inherit;
  width: 1em;
  margin-right: 0.2em;
  text-align: center;
  font-variant: normal;
  text-transform: none;
  line-height: 1em;
  margin-left: 0.2em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.logo-container {
  width: 405px;
  height: 73px;
  display: block;
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Box component improvements */
.box {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
}

/* Button styling improvements */
.button.is-info.is-light {
  background: linear-gradient(135deg,
      rgba(58, 123, 213, 0.18) 0%,
      rgba(0, 210, 255, 0.15) 100%);
  color: #2b6cb0;
  border: 1px solid rgba(58, 123, 213, 0.4);
  transition: all 0.2s ease;
  /* Added smooth transition */
}

.button.is-info.is-light:hover {
  background: linear-gradient(135deg,
      rgba(58, 123, 213, 0.25) 0%,
      rgba(0, 210, 255, 0.22) 100%);
  border-color: rgba(58, 123, 213, 0.6);
}

.button.is-warning.is-light {
  background: linear-gradient(135deg,
      rgba(255, 159, 28, 0.15) 0%,
      rgba(255, 200, 87, 0.12) 100%);
  color: #f28e1c;
  border: 1px solid rgba(255, 159, 28, 0.35);
  transition: all 0.2s ease;
}

.button.is-warning.is-light:hover {
  background: linear-gradient(135deg,
      rgba(255, 159, 28, 0.22) 0%,
      rgba(255, 200, 87, 0.19) 100%);
  border-color: rgba(255, 159, 28, 0.5);
}

.notification.is-success,
.button.is-success.is-light {
  background: linear-gradient(135deg,
      rgba(34, 197, 94, 0.15) 0%,
      rgba(16, 185, 129, 0.12) 100%);
  color: #059669;
  border: 1px solid rgba(34, 197, 94, 0.35);
  transition: all 0.2s ease;
}

.button.is-success.is-light:hover {
  background: linear-gradient(135deg,
      rgba(34, 197, 94, 0.22) 0%,
      rgba(16, 185, 129, 0.19) 100%);
  border-color: rgba(34, 197, 94, 0.5);
}

.notification.is-danger,
.button.is-danger.is-light {
  background: linear-gradient(135deg,
      rgba(255, 79, 79, 0.15) 0%,
      rgba(255, 159, 28, 0.12) 100%);
  color: #e64040;
  border: 1px solid rgba(255, 79, 79, 0.35);
  transition: all 0.2s ease;
}

.button.is-danger.is-light:hover {
  background: linear-gradient(135deg,
      rgba(255, 79, 79, 0.22) 0%,
      rgba(255, 159, 28, 0.19) 100%);
  border-color: rgba(255, 79, 79, 0.5);
}

/* DataTables customizations */
.dt-search {
  width: 100%;
  padding: 0;
  margin: 0;
}

.dt-search label,
.dt-search-label,
.dt-search label span,
.dt-search-label span {
  display: none !important;
}

.dt-search input[type='search'] {
  width: 100% !important;
  box-sizing: border-box;
  border: none !important;
  border-bottom: 1px solid #dddddd !important;
  border-radius: 0 !important;
  padding: 0.5em 0;
  background: transparent;
  outline: none;
  font-size: 1em;
  margin: 0;
  line-height: 1.2;
  display: block;
  transition: border-color 0.2s ease;
  /* Added smooth transition */
}

.dt-search input[type='search']:focus {
  border-bottom-color: #8a5a44;
  /* Match theme color on focus */
}

/* Responsive DataTables controls */
table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
  margin-right: 0.5em;
  display: inline-block;
  box-sizing: border-box;
  content: '👉🏻';
  font-size: 1em;
  color: rgba(0, 0, 0, 0.7);
  border: none;
}

table.dataTable.dtr-inline.collapsed>tbody>tr.dtr-expanded>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr.dtr-expanded>th.dtr-control:before {
  content: '👇🏻';
  border: none;
}

/* Mobile Menu Slide-in - SvelteKit Fix */
@media screen and (max-width: 1023px) {

  /* Style the navbar container for mobile */
  .navbar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
    transform: translateX(100%); /* Start off-screen using transform */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10005;
    padding: 5rem 0 2rem;
    overflow-y: auto;
    /* Performance optimizations for Chrome mobile */
    will-change: transform;
    -webkit-transform: translateX(100%);
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  /* When menu is active, slide the navbar in */
  .navbar.is-active {
    transform: translateX(0);
    -webkit-transform: translateX(0);
  }

  .navbar-menu {
    position: static;
    /* Let the parent navbar handle positioning */
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: block !important;
    /* Override Bulma's display:none */
    padding: 0;
  }

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    contain: strict;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
    will-change: opacity, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
  }

  /* On smaller screens where menu takes 80vw, adjust overlay */
  @media screen and (max-width: 375px) {
    .mobile-menu-overlay {
      right: 80vw;
      /* Match the max-width of the menu */
    }
  }

  /* Ensure menu toggle stays on top */
  .menu-toggle {
    z-index: 10020;
    /* Highest of all */
  }

  /* Ensure menu items are clickable */
  .navbar-menu .navbar-item {
    padding-left: 2em;
    pointer-events: auto;
    position: relative;
    z-index: 10015;
    /* Ensure menu items are above everything */
  }

  .navbar-menu .navbar-item.is-active {
    text-decoration: underline;
    text-decoration-color: #b87333;
  }

  .navbar-item .account-label {
    display: inline !important;
  }
  
  /* Add padding to hero section on mobile */
  .hero {
    padding-top: 4em;
  }
}