/*
components.css
 */

.gtab-shell {
  margin-bottom: 1.25rem;
}

.gtab-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
}

.gtab-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  padding: 0.55rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.gtab-chip__icon {
  font-size: 0.95rem;
  line-height: 1;
  color: var(--color-text-soft);
  transition: color 0.18s ease;
}

.gtab-chip:hover,
.gtab-chip:focus {
  color: var(--color-text-main);
  text-decoration: none;
}

.gtab-chip:hover .gtab-chip__icon,
.gtab-chip:focus .gtab-chip__icon {
  color: var(--color-primary);
}

.gtab-chip:focus-visible {
  outline: 0;
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.gtab-chip.is-active {
  color: var(--color-primary);
  font-weight: 600;
}

.gtab-chip.is-active .gtab-chip__icon {
  color: var(--color-primary);
}

.gtab-chip.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--color-primary);
}

.gtab-chip__text {
  display: inline-block;
  white-space: nowrap;
}

.ajus-postcard {
  overflow: visible;
  box-shadow: none !important;
}

.ajus-postcard-body {
  padding-top: 0.95rem !important;
  padding-bottom: 0.95rem !important;
}

.ajus-postcard-title {
  font-size: 1.72rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.24;
  max-width: 720px;
  margin-bottom: 0.45rem;
}

/* Postcard body — the content box only. Everything *inside* it (headings,
   paragraphs, lists, links, quotes, code, images, rules) is styled by the
   theme's rich-text stylesheet, `Assets/css/content.css`, reached through the
   `.ajus-content` class `Global/Cards/postcard.twig` puts on this wrapper — so
   a postcard, an article page and the editor that produced them all render the
   same, from one scale. Never re-declare content element rules here. */
.ajus-postcard-content {
  color: var(--color-text-main);
  font-size: var(--rich-font-size);
  line-height: var(--rich-line-height);
  max-width: var(--rich-measure);
}

.ajus-postcard .ajus-chip {
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
}

.ajus-postcard .ajus-ui-chip {
  font-size: 0.6rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.ajus-postcard-footer {
  background: #fff !important;
  border-top: 1px solid #edf1f4;
}

.ajus-postcard-action a,
.ajus-postcard-action button,
.ajus-postcard-action span {
  color: #636b74;
  font-size: 0.9rem;
  font-weight: 500;
}

.ajus-postcard-action a:hover,
.ajus-postcard-action button:hover,
.ajus-postcard-action a:focus,
.ajus-postcard-action button:focus {
  color: #2f3437;
  text-decoration: none;
}

/* Postcard actions may render as <button>, <a> or <span> — both in the visible
   row and inside the "more" dropdown (where the .ajus-postcard-action wrapper
   is absent). Scope to the footer and drop the native button chrome so every
   action looks identical. */
.ajus-postcard-footer a,
.ajus-postcard-footer button,
.ajus-postcard-footer .ajus-btn-post-action,
.ajus-postcard-footer .ajus-postcard-split {
  border: 0;
}

.ajus-postcard-more {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  color: var(--color-text-soft);
  background: transparent;
  box-shadow: none !important;
}

.ajus-postcard-more:hover,
.ajus-postcard-more:focus {
  background: #f5f7f8;
  color: var(--color-text-main);
  text-decoration: none;
}



@media (max-width: 767.98px) {
  .ajus-postcard-title {
    font-size: 1.28rem;
    line-height: 1.3;
  }

  .ajus-postcard-content {
    font-size: 0.9rem;
    line-height: 1.55;
  }
}

@media (max-width: 575.98px) {
  .gtab-track {
    flex-wrap: nowrap;
    gap: 1.1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .gtab-chip {
    flex: 0 0 auto;
    font-size: 0.9rem;
  }
}

/* Global reusable elements */

.ajus-author-space {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.8rem 0.45rem 0.45rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-bg-surface) 0%, var(--color-bg-surface-soft) 100%);
  box-shadow: 0 4px 14px rgba(29, 39, 51, 0.06);
  transition: all 0.2s ease;
  min-width: 0;
  max-width: 320px;
}

.ajus-author-space:hover {
  border-color: var(--color-border-primary);
  box-shadow: 0 8px 20px rgba(53, 168, 223, 0.12);
  transform: translateY(-1px);
}

.ajus-author-space-avatar {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  flex: 0 0 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-primary-soft);
  background-size: cover;
  background-position: center;
  border: 2px solid var(--color-bg-surface);
  box-shadow: 0 0 0 1px var(--color-border);
  color: var(--color-text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ajus-author-space-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ajus-author-space-name {
  color: var(--color-text-main);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ajus-author-space-line {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

@media (max-width: 991.98px) {
  .ajus-author-space {
    max-width: 100%;
  }

  .ajus-author-space-line {
    max-width: 100%;
  }
}

.tabbed-window__panel {
  min-height: 40px;
}

.tabbed-window__panel--loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* Vertical navigation collapses to a scrollable row on small screens. */
@media (max-width: 767.98px) {
  .tabbed-window[data-tabbed-orientation="vertical"] .nav.flex-column {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Global segmented filter (Global/Navigations/segmented_filter.twig) */

.gfilter-nav {
  margin-bottom: 1rem;
}

.gfilter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border-radius: 999px;
  background: var(--color-bg-surface-soft);
  border: 1px solid var(--color-border-soft);
}

.gfilter__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.gfilter__item:hover,
.gfilter__item:focus {
  color: var(--color-text-main);
  background: var(--color-bg-surface);
  text-decoration: none;
}

.gfilter__item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.gfilter__item.is-active {
  color: var(--color-text-on-primary);
  background: var(--color-primary);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.gfilter__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-muted);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-soft);
}

.gfilter__item.is-active .gfilter__count {
  color: var(--color-text-on-primary);
  background: color-mix(in srgb, var(--color-text-on-primary) 22%, transparent);
  border-color: transparent;
}

/* Load-more pagination control (Views/pagination.twig + pagination_table.twig).
   A centred label on a hairline rule that closes the listing without competing
   with it. The anchor must stay a direct child of the listing container, so the
   rule is drawn with the anchor's own pseudo-elements rather than a wrapper.

   Specificity is intentional: `.ajus-btn.ajus-load-more` (two classes) must beat
   the `.ajus-btn` / `.ajus-btn-ghost` defaults in buttons.css, which is loaded
   after this file — a single-class `.ajus-load-more` would lose the cascade. */
.ajus-btn.ajus-load-more {
  --btn-bg: transparent;
  --btn-color: var(--color-text-main);
  --btn-border: transparent;
  --btn-hover-bg: transparent;
  --btn-hover-color: var(--color-primary);
  --btn-hover-border: transparent;
  --btn-hover-shadow: none;

  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 1.75rem 0 0.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ajus-btn.ajus-load-more::before,
.ajus-btn.ajus-load-more::after {
  content: '';
  flex: 1 1 1.5rem;
  height: 1px;
  background: var(--color-border-soft);
}

.ajus-btn.ajus-load-more::before {
  margin-right: 0.85rem;
}

.ajus-btn.ajus-load-more::after {
  margin-left: 0.85rem;
}

.ajus-btn.ajus-load-more > i {
  font-size: 0.85em;
  transition: transform 0.16s ease;
}

.ajus-btn.ajus-load-more:hover > i,
.ajus-btn.ajus-load-more:focus > i {
  transform: translateY(2px);
}
