.responsive-title {
    font-weight: 500;
    word-wrap: break-word; /* Ensures text wraps on small screens */
}
  
@media (max-width: 576px) {
  .responsive-title {
    font-size: 1rem; /* Adjust to your preference */
  }
}

@media (min-width: 768px) {
  .col-synonym {
      width: 40%;
  }
  .col-standard {
      width: 60%;
  }
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #f4f4f4;
  color: #666;
  font-size: 0.9rem;
  position: fixed; /* Fixes the footer at the bottom of the page */
  bottom: 0; /* Aligns it to the bottom of the viewport */
  width: 100%; /* Ensures it spans the full width */
  z-index: 1100; /* Higher than the MudDrawer's z-index */
}

.footer .left {
  text-align: left;
  flex: 1;
}

.footer .center {
  text-align: center;
  flex: 1;
  white-space: nowrap; /* Prevent text from wrapping */
  overflow: hidden; /* Prevent overflow if the text is too long */
  text-overflow: ellipsis; /* Add ellipsis if the text overflows */
}

.footer .right {
  text-align: right;
  flex: 1;
}

/* ModelTreeViewComponent styles */
.model-match {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.model-tree-container .tree-item {
    display: block !important;
    margin-bottom: 4px;
    position: relative;
    width: 100%;
}

.model-tree-container .tree-item-row {
    display: flex !important;
    align-items: center;
    padding: 2px 0;
    min-height: 28px;
    width: 100%;
}

.model-tree-container .tree-item-content {
    flex: 1;
    padding: 4px 6px;
    border-radius: 4px;
    line-height: 1.4;
}

.model-tree-container .tree-item-content:hover {
    background-color: #f5f5f5;
}

.model-tree-container .tree-item-content .tree-link {
    color: var(--mud-palette-primary) !important;
    text-decoration: none !important;
    display: inline-block;
    width: 100%;
    cursor: pointer;
}

.model-tree-container .tree-item-content .tree-link:hover {
    text-decoration: underline !important;
}

.model-tree-container .tree-expand-button {
    width: 24px;
    height: 24px;
    min-height: 24px;
    margin-right: 6px;
    flex-shrink: 0;
}

.model-tree-container .tree-spacer {
    width: 24px;
    margin-right: 6px;
    display: inline-block;
    flex-shrink: 0;
}

.model-tree-container .tree-children {
    margin-left: 20px !important;
    border-left: 1px dotted #ccc;
    padding-left: 10px !important;
    margin-top: 2px;
    width: auto;
}

.model-tree-container .tree-controls {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.model-tree-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

.model-tree-container .mud-tree-view {
    font-family: inherit;
    width: 100%;
}

.model-tree-container .tree-node {
    margin-bottom: 2px;
    width: 100%;
}

/* Mobile responsive styles for tree buttons */
@media (max-width: 768px) {
  .model-tree-container .tree-controls .mud-button-group-root .mud-button-root
  {
    width: 90% !important;
    margin-left: 2px !important;
  }
  .mud-button-group-horizontal:not(.mud-button-group-rtl) > .mud-button-root:not(:first-child),
  .mud-button-group-horizontal:not(.mud-button-group-rtl) > :not(:first-child) .mud-button-root {
    width: 90% !important;
    margin-left: 2px !important;
  }
}

.bullet-item::before {
  content: "• ";
  margin-right: 0.25rem;
  color: inherit;
}

.mud-main-content.main-content-padding {
  padding-bottom: 50px !important;
}

.appbar-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.appbar-images {
  display: flex;
  align-items: center;
}

.appbar-logo {
  height: 40px; /* Adjust size */
  margin-right: 5px; /* Spacing between logo and title */
}

.appbar-title {
  height: 40px; /* Adjust size to match */
}

.menu-button {
  display: flex;
  align-items: center;
  gap: 8px; /* Spacing between icon and text */
  font-size: 1rem; /* Adjust font size of the text */
}

.main-nav-menu .mud-nav-link,
.main-nav-menu .mud-nav-link .mud-nav-link-text {
    font-size: 1.2rem;
    font-weight: 500;
}

@font-face {
  font-family: 'Aptos';
  src: url('/fonts/aptos/Aptos.woff2') format('woff2'),
       url('/fonts/aptos/Aptos.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Aptos';
  src: url('/fonts/aptos/Aptos-SemiBold.woff2') format('woff2'),
       url('/fonts/aptos/Aptos-SemiBold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

body {
  font-family: 'Aptos', sans-serif;
}

.sticky-header {
  position: sticky;
  top: 60px;
  z-index: 1000; /* Adjust as needed so it stays above other content */
  background-color: white; /* Or specify a color if needed */  
}

/* For desktop view (screens 768px and wider) */
@media (min-width: 768px) {
  .sticky-header {
    top: 75px;
  }
}

.selected-link {
  background-color: var(--mud-palette-primary);
  color: white;
  border-radius: 4px;
  padding: 4px 8px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .synonym-carousel .mud-carousel-item {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 35px;
    }
    
    .synonym-carousel button[aria-label="Previous"] {
        left: -5px;
    }
    
    .synonym-carousel button[aria-label="Next"] {
        right: -5px;
    }
}

/* Mobile-specific adjustments for ModelTreeViewComponent */
@media (max-width: 576px) {
    /* Make MudButtonGroup stack vertically on mobile */
    .model-tree-container .tree-controls .mud-button-group-root {
        flex-direction: column;
        width: 100%;
    }
    
    .model-tree-container .tree-controls .mud-button-group-root .mud-button-root {
        width: 100%;
        border-radius: 4px !important;
        margin-bottom: 4px;
        border-left-width: 1px !important;
        border-top-width: 1px !important;
    }
    
    .model-tree-container .tree-controls .mud-button-group-root .mud-button-root:last-child {
        margin-bottom: 0;
    }
    
    /* Ensure proper tree indentation on mobile */
    .model-tree-container .tree-children {
        margin-left: 18px !important;
        padding-left: 10px !important;
    }
    
    .model-tree-container .tree-expand-button {
        width: 28px;
        height: 28px;
        min-height: 28px;
        margin-right: 6px;
    }
    
    .model-tree-container .tree-spacer {
        width: 28px;
        margin-right: 6px;
    }
}/* ImageDirGrid */
.imagedir-paper {
    overflow-x: hidden;
}

.imagedir-grid {
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 10px;
    max-width: 100%;
    table-layout: fixed;
}

.imagedir-grid td {
    text-align: center;
    vertical-align: top;
    min-width: 120px;
}

.imagedir-trigger {
    cursor: zoom-in;
}

.imagedir-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 162px;
}

.imagedir-cell img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.imagedir-label {
    color: #127C66;
    font-weight: 600;
    overflow-wrap: anywhere;
    text-align: center;
}

.imagedir-gallery-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(5, 11, 20, 0.74);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.imagedir-gallery-shell {
    width: min(1120px, 100%);
    max-height: min(92vh, 900px);
    overflow: hidden;
    background: linear-gradient(180deg, #f6f9fc 0%, #e9f0f7 100%);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
}

.imagedir-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px 8px;
}

.imagedir-gallery-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 8px 16px;
    perspective: 1400px;
}

.imagedir-gallery-card {
    flex: 0 0 138px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transform: rotateY(-18deg) rotateX(2deg);
    transform-origin: center center;
    box-shadow: -10px 14px 22px rgba(0, 0, 0, 0.32);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.imagedir-gallery-card.is-left {
    transform: rotateY(-30deg) rotateX(2deg);
}

.imagedir-gallery-card.is-right {
    transform: rotateY(30deg) rotateX(2deg);
}

.imagedir-gallery-card img {
    width: 112px;
    height: 112px;
    object-fit: contain;
}

.imagedir-gallery-card-label {
    color: #0b6d5b;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
}

.imagedir-gallery-card.is-active {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05) translateY(-6px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
}

.imagedir-gallery-preview {
    margin: 8px;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.imagedir-gallery-preview img {
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 320px);
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.imagedir-gallery-preview::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 16px;
    background: #dce6f2;
    z-index: 2;
    pointer-events: none;
}

@media (max-width: 900px) {
    .imagedir-grid {
        width: 100%;
        border-spacing: 8px;
    }

    .imagedir-grid tbody {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .imagedir-grid tr {
        display: contents;
    }

    .imagedir-grid td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .imagedir-cell {
        min-height: 0;
        padding: 4px 0;
    }

    .imagedir-cell img {
        width: min(120px, 50vw);
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .imagedir-gallery-shell {
        padding: 8px;
    }

    .imagedir-gallery-card {
        flex-basis: 126px;
        transform: rotateY(-16deg);
    }

    .imagedir-gallery-card.is-left {
        transform: rotateY(-24deg);
    }

    .imagedir-gallery-card.is-right {
        transform: rotateY(24deg);
    }

    .imagedir-gallery-card.is-active {
        transform: rotateY(0deg) scale(1.03);
    }

    .imagedir-gallery-card img {
        width: 100px;
        height: 100px;
    }
}
