/* ui states */
.error {
  color: red !important;
}

.disabled {
  /* pointer-events: none; */
  opacity: 0.6;
  cursor: not-allowed !important;
}

.show {
  display: flex !important;
}

.hide {
  display: none;
}

.visible {
  visibility: visible !important;
}

.hidden {
  visibility: hidden !important;
}

/* default styles */
a {
  text-decoration: none;
  /* color: #000; */
}

a:hover {
  text-decoration: underline;
}

a:active {
  color: #000;
}

.autocomplete-results {
  border: 1px solid #ccc;
  position: absolute;
  z-index: 1000;
  display: none;
  /* Hidden by default */
  bottom: 0px;
  width: 100%;
  max-height: 120px;
  /* Set a maximum height */
  overflow-y: auto;
  /* Enable vertical scrolling */
  overflow-x: hidden;
  /* Hide horizontal scroll */
  z-index: 8888;
}

.autocomplete-item {
  padding: 8px;
  cursor: pointer;
  background-color: #fff;
}

.autocomplete-item:hover {
  background-color: #f0f0f0;
}


h1,
h2,
h3,
h4,
h5,
h6,
ul {
  margin-top: 5px;
  margin-bottom: 5px;
  padding: 0;
}

.link {
  text-decoration: underline;
}


.action-button {
  background: #00d1b2 !important;
  color: #121212 !important;
  padding: 10px 20px;
  border: none !important;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.action-button:hover {
  background: #008c7e !important;
}

.desktop-section {
    background: var(--desktop_section-background);
    color: var(--desktop_section-color);
}

.desktop-overlay {
    background: var(--desktop_overlay-background);
    color: var(--desktop_overlay-color);
}

.desktopInput {
  padding: 6px;
  width: 9vw;
  text-decoration: none;
  font-size: clamp(12px, 0.8vw, 24px);
  margin: 4px 2px;
  border-radius: 4px;
}

.tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-list li {
    margin: 0;
}

.tab-list li:hover {
  background: var(--desktop_element_hover-background);
}

.tab-list a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #666;
    text-decoration: none;
    border-right: 1px solid #ddd;
}

.tab-list a:hover {
    text-decoration: none;
}

.tab-list a.active {
    background: #fff;
    border-bottom: 2px solid #007bff;
    margin-bottom: -1px;
    font-weight: bold;
}

.tabs-container .tab-list {
  display: flex;
  /* gap: 20px; */
  align-items: center;
  justify-content: center;
  font-size: 18px;
  user-select: none;
}

.tabs-container .tab-list li {
  display: inline-block;
  /* margin-right: 10px; */
  /* small border */
  user-select: none;
}

.tabs-container .tab-list li.active a {
  font-weight: bold;
  color: var(--desktop_text-color);
}

.tabs-container .tab-content {
  display: none;
  padding: 10px;
  /* border: 1px solid #ccc; */
  margin-top: -1px;
}

.tabs-container .tab-content:target {
  display: block;
}

#buddypad {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

button.largest {
  padding: 10px 20px;
  font-size: 24px;
  min-height: 70px;
}

.ui-button {
  width: 100px;
  cursor: pointer;
  border: solid;
  border-width: 1px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin-left: 5px;
  margin-right: 5px;
  border-radius: 4px;
}

.ui-button:hover {
  color: #008F11;
  background-color: #FFF;
  filter: drop-shadow(5px 5px 2px #4444dd);
  /*
    animation-name: rainbow;
    animation-duration: 2.1111s;
    */
  opacity: 0.7;
  animation-iteration-count: infinite;
}


@keyframes ui-button {
  from {
    background-color: blue;
  }

  to {
    background-color: yellow;
  }
}
@media (max-width: 767px) and (pointer: coarse) and (hover: none) {
    /* Set base font size for consistency (optional, only if not already set) */
    html {
        font-size: 16px; /* Adjust to 14px for smaller scaling if needed */
    }

    .ui-button {
        width: 100%; /* Unchanged, full-width is good */
        font-size: 1rem; /* ~16px, slightly increased from 14px for readability */
        padding: 0.75rem; /* ~12px, added for touch-friendly tap target */
    }

    .tabs-container .tab-list {
        text-align: center; /* Unchanged */
        font-size: 1.25rem; /* ~20px, reduced from 44px */
        flex-direction: column; /* Unchanged, good for mobile */
        width: 100%; /* Unchanged, full-width is good */
    }

    .tabs-container .tab-list li {
        margin-right: 0; /* Unchanged */
        margin-bottom: 0.625rem; /* ~10px, unchanged but in rem */
        width: 100%; /* Unchanged */
    }

    .tabs-container .tab-list li a {
        font-size: 1.5rem; /* ~24px, reduced from 64px */
        width: 100%; /* Unchanged */
        padding: 0.75rem; /* ~12px, added for touch-friendly tap target */
    }
}

table {
  background: var(--ui_table-background);
  color: var(--ui_table-color);
  border: var(--ui_table-border);
}

/* ui_table_row_even */
table tr:nth-child(even) {
  background: var(--ui_table_row_even-background);
  color: var(--ui_table_row_even-color);
  border: var(--ui_table_row_even-border);
}

/* Discord or low-height media query */
@media (max-height: 480px) {

  .tabs-container {
    width: 80%;
  }
  .tabs-container .tab-list {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    /* width: 3.5rem; */
    position: absolute;
    right: 0;
    top: 0;
    background: rgba(60, 60, 60, 0.9); /* Match taskbar background */
    backdrop-filter: blur(0.75rem);
    border-right: 0.0625rem solid rgba(255, 255, 255, 0.1); /* ~1px */
    padding: 0.5rem; /* ~8px */
    z-index: 99998; /* Below taskbar */
  }
  .tabs-container .tab-list li {
    width: 100%;
    margin-bottom: 0.625rem; /* ~10px */
    margin-right: 0;
  }
  .tabs-container .tab-list li a {
    width: 100%;
    padding: 0.5rem; /* ~8px, compact for vertical */
    font-size: 0.875rem; /* ~14px, smaller for vertical fit */
    border-right: none;
    border-bottom: 1px solid #ddd; /* Separator for vertical tabs */
    text-align: center;
    color: #e0e0e0; /* Match taskbar text */
  }
  .tabs-container .tab-list li.active a {
    border-bottom: 2px solid #007bff;
    font-weight: bold;
    color: var(--desktop_text-color);
  }
  .tabs-container .tab-list li:hover {
    background: var(--desktop_element_hover-background);
  }
  .tabs-container .tab-content {
    width: calc(100% - 4rem); /* Adjust for tab width and padding */
    padding: 0.75rem; /* ~12px */
    font-size: 1rem; /* ~16px */
  }
  .tabs-container .tab-content:target {
    display: block;
  }
  .ui-button {
    width: 100%;
    font-size: 1rem; /* ~16px */
    padding: 0.75rem; /* ~12px */
  }
}