:root {
  --primary: rgba(133, 133, 255);
  /* --secondary: #37a16c; */
  --primary-op-5: rgba(133, 133, 255, 0.5);
  --primary-op-2: rgba(133, 133, 255, 0.2);
  --primary-linear: linear-gradient(90deg, #11998e 0%, #32bd67 100%);
  --star: rgb(255, 217, 0);
  --error: #dc3545;
  --text-color-primary: rgb(55 65 81);
  --text-color-secondary: rgb(75 85 99);
  --text-color-disable: #999;
  --border-color: #ebebeb;
}

::selection {
  color: white;
  background-color: var(--primary);
}

p,
span {
  font-family: "Montserrat", sans-serif !important;
}

body {
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  overflow: overlay;
}

body::-webkit-scrollbar {
  width: 8px !important;
}

body::-webkit-scrollbar-thumb {
  background: rgba(60, 60, 60, 0.3);
  border-radius: 999999px;
}

a {
  text-decoration: none !important;
}

hr {
  background-color: #f5f5f5;
  border: none !important;
  display: block;
  height: 2px !important;
  margin: 3rem 0 !important;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgb(241, 241, 241);
  border-radius: 999999px;
}

input[type="text"],
input[type="number"],
textarea,
select {
  padding: 4px 8px !important;
  border: solid 1px var(--border-color);
  border-radius: 4px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border: solid 1px var(--primary);
  box-shadow: 0px 0px 0px 4px var(--primary-op-2) !important;
}

.radio {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  transition: border 0.05s ease;
}

input[type="radio"]:checked ~ .radio {
  border: 4px solid var(--primary);
}

.ct-popover {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.75);
  border-radius: 4px;
  background-color: white;
  box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%);
  transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
}

.ct-popover.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}
.box-menu .box-item {
  border: 2px solid #8585ff;
  padding: 10px;
  background-color: #8585ff;
  float: left;
  border-radius: 5px;
  margin: 5px;
  color: #fff;
}
.box-menu .box-item:hover {
  border: 2px solid #8585ff;
}
.box-menu .box-item .box-item-image {
  float: left;
}
.box-menu .box-item .box-item-image img {
  height: 32px;
}

.box-menu .box-item .box-item-text {
  float: left;
  font-size: 1.2rem;
  margin-left: 10px;
  margin-top: 5px;
}
#tbl-next-up.in-viewport {
  /* transform: translate(-16px, -115px) !important; */
  border-top: 5px solid red;
}
#tbl-next-up {
  bottom: 300px !important;
}
@media (max-width: 1024px) {
  #tbl-next-up {
    bottom: 0px !important;
  }
}

/* Outer Container */
.outer-container {
  margin-top: 4rem;              /* mt-16: 4rem = 64px */
  border-top: 1px solid #f3f4f6;  /* border-t with gray-100 (#f3f4f6) */
  padding-top: 1.5rem;            /* pt-6: 1.5rem = 24px */
}
.dark .outer-container {
  border-top-color: #1f2937;      /* dark:border-gray-800 */
}

/* Share Link Box */
.share-link-container {
  background-color: #f3f4f6;           /* bg-gray-100 */
  border-bottom: 1px solid #d1d5db;     /* border-b; using an approximate gray value */
  border-top-left-radius: 12px;         /* rounded-t-xl */
  border-top-right-radius: 12px;        /* rounded-t-xl */
  padding: 0.75rem 1rem;                /* py-3 (0.75rem) and px-4 (1rem) */
  margin-bottom: 0.75rem;               /* mb-3 */
}
@media (min-width: 768px) {
  .share-link-container {
    padding: 1rem 1.25rem;             /* md:py-4 (1rem) and md:px-5 (1.25rem) */
  }
}
.dark .share-link-container {
  background-color: #1f2937;           /* dark:bg-gray-800 */
  border-bottom-color: #374151;        /* dark:border-gray-700 */
}

/* Text Styles */
.share-link-text {
  margin-top: 0.25rem;           /* mt-1: 0.25rem = 4px */
  font-size: 0.875rem;           /* text-sm: ~14px */
  color: #6b7280;               /* text-gray-500 */
}
.dark .share-link-text {
  color: #6b7280;               /* dark:text-gray-500 (same as light) */
}

.share-link-warning {
  margin-top: 0.25rem;           /* mt-1 */
  font-size: 0.75rem;            /* text-xs: ~12px */
  color: black;                /* using black as the default light mode text */
}
.dark .share-link-warning {
  color: white;                /* dark:text-white */
}

/* Backlink Container */
.block-backlink {
  display: flex;                 /* flex container */
  flex-wrap: wrap;               /* allow wrapping */
  justify-content: center;       /* center items horizontally */
  row-gap: 0.5rem;               /* gap-y-2: 0.5rem = 8px vertical gap */
}

/* Add dividers between flex items */
.block-backlink > *:not(:last-child) {
  border-right: 2px solid #6b7280;  /* divide-x-2 with divide-gray-500 (#6b7280) */
}

/* Backlink Links (migrating inline styles) */
.block-backlink a {
  display: block;
  color: #007bff;               /* blue link color */
  text-decoration: underline;
}
.block-backlink * {
  padding: 0 5px;
}