:root {
  --tab-main: #823733;
  --tab-gray: #f0f0f0;
}

.gcac-category-tabs-container {
  width: 100%;
  position: relative;
}

.gcac-tab-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 0.5rem;
  background: #fff;
  border-bottom: 2px solid var(--tab-gray);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-padding-left: 1rem;
  gap: 0.25rem;
  cursor: grab;
}

.gcac-tab-nav::-webkit-scrollbar {
  display: none;
}

.gcac-tab-title {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  white-space: nowrap;
  transition: all 0.3s;
  flex-shrink: 0;
  min-width: fit-content;
}

.gcac-tab-title.active {
  border-bottom: 2px solid var(--tab-main);
  color: var(--tab-main);
  text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
  background-color: #f9f9f9;
  border-radius: 6px 6px 0 0;
}

.gcac-tab-contents-wrapper {
  position: relative;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* FIXED SCROLL CONTAINER */
.gcac-tab-content {
  padding: 1rem;
  overflow-y: auto; /* Essential for desktop scrolling */
  display: none;
  background: transparent;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-overflow-scrolling: touch;
  height: 300px;
  max-height: 300px;
}

.gcac-tab-content.active {
  display: block;
}

.gcac-post-list {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}

/* TALLER LIST ITEMS TO ENSURE SCROLLING */
.gcac-post-list li {
  margin: 1rem 0; /* Increased margin */
  padding: 0.5rem 0; /* Increased padding */
  border-bottom: 1px solid #eee;
  line-height: 1.4;
  display: flex;
  align-items: center;
  min-height: 50px; /* Ensure consistent height */
}

.gcac-post-list li:last-child {
  border-bottom: none;
}

.gcac-tab-loading {
  display: none;
  justify-content: center;
  align-items: center;
  height: 50px;
  color: var(--tab-main);
  font-style: italic;
}

.gcac-spinner {
  border: 3px solid rgba(130, 55, 51, 0.2);
  border-top: 3px solid var(--tab-main);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.gcac-category-tabs-container p {
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
}

.gcac-category-tabs-container p a {
  color: var(--tab-main);
  text-decoration: underline;
  font-weight: 600;
}

.gcac-category-tabs-container p a:hover {
  text-decoration: none;
}

.gcac-post-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #823733;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    opacity: 1;
  }
}

.gcac-no-more {
  text-align: center;
  font-style: italic;
  color: #666;
  padding: 10px;
  list-style: none !important;
  border: none !important;
}

@media (max-width: 768px) {
  .gcac-tab-nav {
    padding: 0.25rem;
    gap: 0.15rem;
  }

  .gcac-tab-title {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .gcac-post-list li {
    margin: 1rem 0; /* Maintain taller items */
    padding: 0.5rem 0;
  }

  /* FIXED HEIGHT FOR MOBILE */
  .gcac-tab-content {
    height: 300px;
    max-height: 300px;
    overflow-y: auto; /* Ensure mobile scrolling */
  }
}

@media (max-width: 576px) {
  .gcac-tab-nav {
    gap: 0.1rem;
  }

  .gcac-tab-title {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  .gcac-tab-content {
    padding: 0.75rem;
  }

  .gcac-post-list {
    padding-left: 0.5rem;
  }

  .gcac-post-list li a {
    display: block;
    word-break: break-word;
    hyphens: auto;
  }
}
