/* Bridge default OJS page markup into Buana EDC Press shell */

.visually-hidden,
.pkp_screen_reader,
.cmp_skip_to_content {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.buana-main {
  min-height: 50vh;
}

/*
 * Neutralize site-uploaded styleSheet.css (legacy red links, justified copy)
 * so the press theme stays black / white / gold.
 */
body.buana-theme,
body.buana-theme p {
  text-align: left !important;
}

body.buana-theme a {
  color: var(--fg) !important;
}

body.buana-theme a:hover,
body.buana-theme a:focus {
  color: var(--gold-deep) !important;
}

body.buana-theme .btn,
body.buana-theme .btn:hover,
body.buana-theme .btn:focus,
body.buana-theme a.btn,
body.buana-theme a.btn:hover,
body.buana-theme a.btn:focus {
  color: inherit !important;
}

body.buana-theme button:not(.nav-toggle):not(.mobile-nav__close),
body.buana-theme input[type="submit"],
body.buana-theme .cmp_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: var(--radius-btn) !important;
  border: 1px solid transparent;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--on-accent) !important;
}

body.buana-theme .btn--gold,
body.buana-theme a.btn--gold {
  color: var(--on-accent) !important;
}

body.buana-theme .btn--ghost-dark,
body.buana-theme a.btn--ghost-dark,
body.buana-theme .btn--ghost-dark:hover,
body.buana-theme a.btn--ghost-dark:hover {
  color: var(--fg) !important;
  background: transparent !important;
}

body.buana-theme .btn--outline-light,
body.buana-theme a.btn--outline-light {
  color: var(--white) !important;
}

body.buana-theme .btn--outline-light:hover,
body.buana-theme a.btn--outline-light:hover {
  color: var(--gold) !important;
}

body.buana-theme .site-hero a.btn--outline-light,
body.buana-theme .cta-banner a.btn--outline-light {
  color: var(--white) !important;
}

body.buana-theme .site-hero a.btn--outline-light:hover,
body.buana-theme .cta-banner a.btn--outline-light:hover {
  color: var(--gold) !important;
}

body.buana-theme .updates-aside__panel a {
  color: var(--white) !important;
}

body.buana-theme .updates-aside__panel a.btn--gold {
  color: var(--on-accent) !important;
}

body.buana-theme .site-footer,
body.buana-theme .site-footer a {
  color: color-mix(in oklab, var(--white) 82%, transparent) !important;
}

body.buana-theme .site-footer a:hover,
body.buana-theme .site-footer a:focus {
  color: var(--gold) !important;
}

body.buana-theme .site-footer__brand .site-logo__name {
  color: var(--white) !important;
}

body.buana-theme .about-site__text-link {
  color: var(--gold-deep) !important;
}

body.buana-theme .cmp_breadcrumbs {
  display: none !important;
}

/* Auth pages */
body.buana-theme.page-interior .auth-main {
  width: 100%;
  margin: 0;
}

body.buana-theme .auth-panel h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
}

body.buana-theme .auth-alert {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-btn);
  background: var(--gold-soft);
  color: var(--fg);
}

body.buana-theme .auth-alert--error {
  background: #fde8e8;
  color: #b42318;
}

body.buana-theme .auth-form .form-row,
body.buana-theme .auth-form .fields > div,
body.buana-theme .auth-form .section,
body.buana-theme .auth-form .identity,
body.buana-theme .auth-form .username,
body.buana-theme .auth-form .email,
body.buana-theme .auth-form .password,
body.buana-theme .auth-form .affiliation,
body.buana-theme .auth-form .country,
body.buana-theme .auth-form .given_name,
body.buana-theme .auth-form .family_name {
  margin-bottom: 0;
}

body.buana-theme .auth-form .auth-fields-grid {
  margin-bottom: 0.85rem;
}

body.buana-theme .auth-form .auth-fields-grid > div {
  margin-bottom: 0;
  display: grid;
  gap: 0.28rem;
  align-content: start;
}

body.buana-theme .auth-form .auth-fields-grid label {
  margin: 0;
}

body.buana-theme .auth-form .auth-fields-grid .label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

body.buana-theme .auth-form .auth-fields-grid input,
body.buana-theme .auth-form .auth-fields-grid select {
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
}

body.buana-theme .auth-form fieldset.identity,
body.buana-theme .auth-form fieldset.login {
  margin: 0;
  padding: 0;
  border: 0;
}

body.buana-theme .auth-form label,
body.buana-theme .auth-form .label {
  display: block;
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
}

body.buana-theme .auth-form input[type="text"],
body.buana-theme .auth-form input[type="email"],
body.buana-theme .auth-form input[type="password"],
body.buana-theme .auth-form input[type="tel"],
body.buana-theme .auth-form select,
body.buana-theme .auth-form textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 0.58rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--fg);
  box-sizing: border-box;
  box-shadow: none;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

body.buana-theme .auth-form input:focus,
body.buana-theme .auth-form select:focus,
body.buana-theme .auth-form textarea:focus,
body.buana-theme .auth-form input:focus-visible,
body.buana-theme .auth-form select:focus-visible,
body.buana-theme .auth-form textarea:focus-visible {
  outline: none !important;
  border-color: var(--gold-deep) !important;
  box-shadow: none !important;
  background: var(--white);
}

body.buana-theme .auth-form fieldset {
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
}

body.buana-theme .auth-form legend {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

body.buana-theme .auth-form .required {
  color: var(--gold-deep);
}

body.buana-theme .auth-form .buttons {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

body.buana-theme .auth-form .auth-form__submit,
body.buana-theme .auth-form button.submit,
body.buana-theme .auth-form button[type="submit"] {
  width: 100%;
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-radius: var(--radius-btn) !important;
  border: 0 !important;
  padding: 0.85rem 1.25rem !important;
  font-weight: 600 !important;
}

body.buana-theme .auth-form a.register,
body.buana-theme .auth-form a.login {
  display: none;
}

body.buana-theme .auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}

body.buana-theme .auth-check input {
  width: 1rem !important;
  height: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--gold-deep);
}

body.buana-theme .auth-check input:focus,
body.buana-theme .auth-check input:focus-visible {
  outline: 1px solid var(--gold-deep) !important;
  outline-offset: 2px;
  box-shadow: none !important;
}

body.buana-theme .auth-fieldset {
  margin: 1.25rem 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border) !important;
}

body.buana-theme .pkp_form_error,
body.buana-theme .pkp_form_error_list,
body.buana-theme .form-group-buttons {
  color: #b42318 !important;
  margin-bottom: 1rem;
}

body.buana-theme .page a:not(.btn):not(.nav-auth):not(.site-logo) {
  color: var(--gold-deep) !important;
}

body.buana-theme .journal-row__desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pkp_structure_head,
.pkp_structure_footer_wrapper,
.pkp_structure_page > .pkp_structure_content {
  display: contents;
}
