/* VYBE Journal Author Directory — public UI. Builds on the main plugin's public.css tokens (--tajp-*); everything is scoped to .vja. */

/* Tamil text: the main plugin's Tamil font stack. */
.vja [lang="ta"], .vja :lang(ta) { font-family: "Noto Sans Tamil", "Latha", "Nirmala UI", "Tamil Sangam MN", sans-serif; }
.vja { overflow-wrap: break-word; }
.vja img { max-width: 100%; }

/* ORCID iD and DOI helpers of the main plugin (TAJP_Metadata::orcid_html / doi_html). */
.vja .tajp-orcid { display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto; margin: 0; padding: 0; background: none; border-radius: 0; color: var(--tajp-p) !important; font-size: inherit; font-weight: 400; line-height: 1.2; vertical-align: middle; text-decoration: none !important; }
.vja .tajp-orcid__icon { display: block; width: 16px; height: 16px; flex: none; }
.vja .tajp-orcid--full .tajp-orcid__icon { width: 20px; height: 20px; }
.vja .tajp-orcid--full .tajp-orcid__id { text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.vja .tajp-orcid:focus-visible, .vja .vja-badge:focus-visible { outline: 3px solid rgba(var(--tajp-p-rgb), .35); outline-offset: 2px; border-radius: 4px; }
.vja .tajp-doi { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; text-decoration: none; }
.vja .tajp-doi__badge { flex: none; padding: 1px 5px; border-radius: 4px; background: var(--tajp-ink); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .05em; line-height: 1.5; }
.vja .tajp-doi__url { text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- avatars & badges */
.vja-avatar { --s: 96px; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; background: var(--vja-av, var(--tajp-p)); color: #fff; font-weight: 700; font-size: calc(var(--s) * .36); line-height: 1; letter-spacing: .02em; text-transform: none; user-select: none; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08); }
img.vja-avatar { display: block; object-fit: cover; background: var(--tajp-soft); }
.vja-avatar--ta { font-size: calc(var(--s) * .42); padding-top: .06em; }
.vja-badge { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--tajp-line); background: var(--tajp-soft); color: #334155 !important; font-size: .74rem; font-weight: 600; line-height: 1.6; text-decoration: none !important; white-space: nowrap; }
.vja-badge:hover { border-color: rgba(var(--tajp-p-rgb), .45); color: var(--tajp-p) !important; }

/* ---------------------------------------------------------------- directory */
.vja-directory { display: grid; gap: 16px; }
.vja-directory__title { margin: 0; }
.vja-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 16px; border: 1px solid var(--tajp-line); border-radius: var(--tajp-r); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.vja-filters .tajp-field > span:first-child { font-size: .82rem; }
.vja-filters__submit .tajp-btn { width: 100%; }
.vja-az { display: grid; gap: 6px; }
.vja-az__row { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.vja-az a, .vja-az span { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 7px; border: 1px solid var(--tajp-line); border-radius: 8px; background: #fff; color: var(--tajp-ink); font-size: .85rem; font-weight: 600; line-height: 1; text-decoration: none; }
.vja-az a:hover { border-color: var(--tajp-p); color: var(--tajp-p); }
.vja-az a:focus-visible { outline: 3px solid rgba(var(--tajp-p-rgb), .35); outline-offset: 1px; }
.vja-az a[aria-current] { background: var(--tajp-p); border-color: var(--tajp-p); color: #fff; }
.vja-az .is-empty { background: transparent; color: #a3b1c2; border-style: dashed; }
.vja-az__row--more a { min-width: 36px; font-size: .95rem; }
.vja-results { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.vja-results__count { margin: 0 !important; color: var(--tajp-muted); font-size: .9rem; }
.vja-results__clear { font-size: .9rem; }
.vja-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.vja-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 22px 16px 16px; border: 1px solid var(--tajp-line); border-radius: var(--tajp-r); background: #fff; text-align: center; transition: border-color .15s, box-shadow .15s; }
.vja-card:hover { border-color: rgba(var(--tajp-p-rgb), .4); box-shadow: var(--tajp-shadow); }
.vja-card:focus-within { outline: 3px solid rgba(var(--tajp-p-rgb), .3); outline-offset: 2px; }
.vja-card .vja-avatar { --s: 96px; }
.vja-card__photo { display: block; margin-bottom: 8px; }
.vja .vja-card__name { margin: 0 !important; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.vja-card__name a { color: var(--tajp-ink); text-decoration: none; }
.vja-card__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vja-card__name a:focus { outline: none; }
.vja-card:hover .vja-card__name a { color: var(--tajp-p); }
.vja .vja-card__aff { margin: 0 !important; color: var(--tajp-muted); font-size: .84rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vja .vja-card__meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; justify-content: center; margin: auto 0 0 !important; padding-top: 10px; font-size: .8rem; }
.vja-card__count { color: #334155; font-weight: 600; }
.vja-card .tajp-orcid, .vja-card .vja-badge { position: relative; z-index: 1; }
.vja-pager { margin: 4px 0 0; }
.vja-pager .vja-pager__gap { border: 0; min-width: 20px; padding: 6px 2px; }
.vja-empty { margin: 0; }

/* ---------------------------------------------------------------- profile */
.vja-profile { display: grid; gap: 18px; }
.vja .vja-back { margin: 0; font-size: .92rem; }
.vja-back a { text-decoration: none; }
.vja-back a:hover { text-decoration: underline; }
.vja .vja-profile__card { max-width: none; margin: 0; }
.vja-profile__head { display: flex; gap: 26px; align-items: center; }
.vja-profile__head > .vja-avatar { --s: 136px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--tajp-line), var(--tajp-shadow); }
.vja-profile__id { min-width: 0; }
.vja-profile__id .tajp-eyebrow { margin-bottom: 2px; }
.vja .vja-profile__name { margin: 0 0 6px; font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); line-height: 1.2; overflow-wrap: anywhere; }
.vja .vja-profile__aff { margin: 0 0 2px; color: #334155; }
.vja .vja-profile__country { margin: 0; }
.vja-ids { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 12px 0 0; padding: 0; list-style: none; font-size: .9rem; }
.vja-ids__web { overflow-wrap: anywhere; }
.vja-profile__bio { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--tajp-line); color: #334155; }
.vja-profile__bio p:last-child { margin-bottom: 0; }
.vja-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.vja-stats > div { padding: 12px 14px; border: 1px solid var(--tajp-line); border-radius: var(--tajp-r-sm); background: var(--tajp-soft); }
.vja-stats dt { color: var(--tajp-muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.vja-stats dd { margin: 2px 0 0; color: var(--tajp-ink); font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.vja-papers h3, .vja-coauthors h3 { margin-bottom: 10px; }
.vja-papers__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.vja-paper { min-width: 0; padding: 16px 20px; border: 1px solid var(--tajp-line); border-radius: var(--tajp-r); background: #fff; transition: border-color .15s, box-shadow .15s; }
.vja-paper:hover { border-color: rgba(var(--tajp-p-rgb), .35); box-shadow: var(--tajp-shadow); }
.vja .vja-paper__title { margin: 0 0 4px; font-size: 1.06rem; line-height: 1.35; }
.vja-paper__title a { color: var(--tajp-ink); text-decoration: none; }
.vja-paper__title a:hover { color: var(--tajp-p); text-decoration: underline; }
.vja .vja-paper__alt { margin: 0 0 6px; color: #475569; font-size: .93rem; font-style: italic; }
.vja .vja-paper__authors { margin: 0 0 6px; color: #334155; font-size: .92rem; }
.vja-paper__authors strong { color: var(--tajp-ink); }
.vja .vja-paper__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin: 0 0 10px; color: var(--tajp-muted); font-size: .84rem; }
.vja .vja-paper__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.vja-coauthors__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.vja-coauthors__list a, .vja-coauthors__plain { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 10px 4px 4px; border: 1px solid var(--tajp-line); border-radius: 999px; background: #fff; color: var(--tajp-ink); font-size: .9rem; text-decoration: none; }
.vja-coauthors__list a:hover { border-color: var(--tajp-p); color: var(--tajp-p); }
.vja-coauthors__list .vja-avatar { --s: 32px; box-shadow: none; }
.vja-coauthors__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vja-notfound__card { max-width: 640px; text-align: center; }
.vja-notfound__card .tajp-eyebrow { font-size: 1rem; }

/* ---------------------------------------------------------------- author lists (widget / [tajp_authors] / block) */
.vja-authors { container-type: inline-size; }
.vja .vja-authors__title { margin: 0 0 12px; }
.vja-authors__list { margin: 0; padding: 0; list-style: none; }
.vja-authors__item { min-width: 0; }
.vja .vja-authors__name { color: var(--tajp-ink); font-weight: 600; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.vja .vja-authors__name:hover { color: var(--tajp-p); text-decoration: underline; }
.vja-authors__aff { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--tajp-muted); font-size: .8rem; line-height: 1.35; }
.vja-authors__meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; color: var(--tajp-muted); font-size: .78rem; }
.vja-authors__photo { flex: none; line-height: 0; }
.vja .vja-authors__more { margin: 12px 0 0; font-size: .9rem; font-weight: 600; }
.vja-authors__more a { text-decoration: none; }
.vja-authors__more a:hover { text-decoration: underline; }
/* list */
.vja-authors--list .vja-authors__list { display: grid; gap: 12px; }
.vja-authors--list .vja-authors__item { display: flex; gap: 12px; align-items: center; }
.vja-authors--list .vja-avatar { --s: 44px; }
.vja-authors--list .vja-authors__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* grid */
.vja-authors--grid .vja-authors__list { display: grid; grid-template-columns: repeat(var(--vja-cols, 4), minmax(0, 1fr)); gap: 12px; }
.vja-authors--grid .vja-authors__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 14px; border: 1px solid var(--tajp-line); border-radius: var(--tajp-r); background: #fff; text-align: center; transition: border-color .15s, box-shadow .15s; }
.vja-authors--grid .vja-authors__item:hover { border-color: rgba(var(--tajp-p-rgb), .4); box-shadow: var(--tajp-shadow); }
.vja-authors--grid .vja-avatar { --s: 72px; }
.vja-authors--grid .vja-authors__body { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; width: 100%; }
.vja-authors--grid .vja-authors__name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vja-authors--grid .vja-authors__meta { justify-content: center; margin-top: 2px; }
.vja-authors--grid .tajp-orcid, .vja-authors--grid .vja-badge { position: relative; z-index: 1; }
/* compact avatars */
.vja-authors--avatars .vja-authors__list { display: flex; flex-wrap: wrap; gap: 8px; }
.vja-authors--avatars .vja-avatar { --s: 46px; transition: transform .15s, box-shadow .15s; }
.vja-authors__av { display: block; border-radius: 50%; line-height: 0; }
.vja-authors__av:hover .vja-avatar, .vja-authors__av:focus-visible .vja-avatar { transform: translateY(-2px); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--tajp-p); }
.vja-authors__av:focus { outline: none; }
.vja-authors__empty { margin: 0; }

@container (max-width: 560px) {
	.vja-authors--grid.vja-cols-4 .vja-authors__list, .vja-authors--grid.vja-cols-3 .vja-authors__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 240px) {
	.vja-authors--grid .vja-authors__list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- submission form photo & author workspace */
.vja-photo-field { display: grid; gap: 10px; margin-top: 4px; padding: 14px 16px; border: 1px dashed #cbd5e1; border-radius: var(--tajp-r); background: var(--tajp-soft); }
.vja-photo-field__head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; color: var(--tajp-ink); }
.vja .vja-photo-field > p { margin: 0; }
.vja-photo-field__row { display: flex; gap: 14px; align-items: center; min-width: 0; }
.vja-photo-field__preview { display: grid; place-items: center; flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: #e2e8f0; color: #94a3b8; }
.vja-photo-field__preview img { width: 100%; height: 100%; object-fit: cover; }
.vja-photo-field__input { flex: 1; min-width: 0; }
.vja-photo-field .tajp-check small { display: block; margin-top: 2px; }
.vja-photo-field--ws { background: #fff; }
.vja-ws h3 { margin-bottom: 8px; }
.vja-ws__pending { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--tajp-r-sm); background: #f0fdf4; border: 1px solid #bbf7d0; }
.vja-ws__pending p { margin: 0; }
.vja-ws__profile { display: flex; gap: 16px; align-items: center; margin: 4px 0 16px; }
.vja-ws__profile .vja-avatar { --s: 72px; }
.vja-ws__profile p { margin: 0 0 4px; }
.vja-ws__form { margin-top: 8px; }
.vja-ws__remove { margin-top: 8px; }
.vja-counter { display: block; color: var(--tajp-muted); font-size: .78rem; text-align: right; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
	.vja-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vja-filters__search { grid-column: 1 / -1; }
	.vja-filters__submit { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
	.vja-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; gap: 10px; }
	.vja-filters > .tajp-field:nth-of-type(2) { grid-column: 1 / -1; }
	.vja-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.vja-card { padding: 16px 10px 12px; }
	.vja-card .vja-avatar { --s: 72px; }
	.vja .vja-card__name { font-size: .95rem; }
	.vja-az a, .vja-az span { min-width: 30px; height: 30px; padding: 0 5px; font-size: .8rem; }
	.vja-profile__head { flex-direction: column; align-items: flex-start; gap: 14px; }
	.vja-profile__head > .vja-avatar { --s: 104px; }
	.vja-stats { gap: 8px; }
	.vja-stats > div { padding: 10px 8px; min-width: 0; }
	.vja-stats dt { font-size: .6rem; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.vja-stats dd { font-size: clamp(.9rem, 4vw, 1.15rem); white-space: nowrap; }
	.vja-paper { padding: 14px; }
	.vja-authors--grid.vja-cols-4 .vja-authors__list, .vja-authors--grid.vja-cols-3 .vja-authors__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 340px) {
	.vja-grid, .vja-filters { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.vja-card, .vja-paper, .vja-authors__item, .vja-avatar { transition: none; }
}
