/*
 * Day 19 WCAG AA common-theme adjustments.
 * Scoped to Umeda Dental Journal components; post HTML and article tables untouched.
 * The existing navy, orange/teal/gold brand accents are preserved.
 */

/* Contrast: --udj-orange-dark was #d95e13 (3.78:1 on white).
 * The existing brand deep-copper #a84409 exceeds 6:1 on white.
 * Keep the decorative --udj-orange unchanged, darken only legible foregrounds. */
:root {
  --udj-orange-dark: #a84409;
  --udj-orange-deep: #a84409;
}

.udj-hero__title .is-accent,
.udj-hero__note small,
.udj-text-link,
.udj-text-button,
.udj-article-card__meta a,
.udj-concern-card__arrow {
  color: #a84409;
}
.udj-concern-card__number {
  color: #65554a;
}
.udj-article-card__placeholder > span {
  color: #88430f;
}

/* Darkened interactive fills keep white 4.5:1+ without recoloring decor. */
.udj-button--primary,
.udj-search-form__button,
.udj-mobile-cta a:last-child,
.page-numbers.current {
  background: #a84409;
  color: #fff;
}
.udj-button--primary:hover,
.udj-search-form__button:hover,
.udj-mobile-cta a:last-child:hover {
  background: #873405;
  color: #fff;
}
.udj-button--primary:active,
.udj-search-form__button:active {
  background: #702a06;
}
.udj-final-cta {
  background: linear-gradient(125deg, #a84409 0%, #873405 100%);
  color: #fff;
}
.udj-final-cta .udj-eyebrow,
.udj-final-cta p:not(.udj-eyebrow),
.udj-final-cta__phone small {
  color: #fff2e7;
}

/* Controls have a visible boundary while preserving the round design. */
.udj-icon-button,
.udj-search-dialog__close {
  border-color: #83746c;
}
.udj-breadcrumb,
.udj-article-meta,
.udj-article-card__meta {
  color: #60564f;
}

/* Mobile touch targets: comfortable 44px primary actions, 24px minimum
 * text targets plus their surrounding spacing. No fixed inline widths. */
.udj-breadcrumb {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.udj-breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 7px;
  border-radius: 7px;
  line-height: 1.55;
}
.udj-article-meta,
.udj-article-card__meta {
  flex-wrap: wrap;
}
.udj-article-meta .udj-chip,
.udj-chip {
  min-height: 40px;
  padding: 6px 14px;
  line-height: 1.4;
}
.udj-article-card__meta a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 5px 5px;
}
.udj-article-card .udj-text-link,
.udj-text-link,
.udj-text-button {
  min-height: 40px;
  padding: 6px 4px;
  line-height: 1.5;
}
.udj-toc__list a {
  display: block;
  min-height: 44px;
  padding: 8px 8px;
  line-height: 1.6;
  border-radius: 7px;
  overflow-wrap: anywhere;
}
.udj-toc__list a:hover,
.udj-toc__list a:focus-visible {
  background: #f0f7f8;
}
.udj-site-footer .udj-footer-menu a,
.udj-site-footer .udj-footer-info dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 2px;
  line-height: 1.45;
}
.udj-search-dialog__suggestions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
}
.navigation.pagination .page-numbers {
  min-width: 44px;
  min-height: 44px;
  height: auto;
}
.udj-mobile-cta a {
  min-height: 64px;
}

/* Keyboard navigation: distinct focus rings across light and dark surfaces. */
.udj-button:focus-visible,
.udj-icon-button:focus-visible,
.udj-menu-button:focus-visible,
.udj-breadcrumb a:focus-visible,
.udj-toc a:focus-visible,
.udj-entry-content a:focus-visible,
.udj-mobile-cta a:focus-visible,
.udj-site-header a:focus-visible,
.udj-search-dialog a:focus-visible,
.udj-search-dialog button:focus-visible,
.udj-mobile-menu a:focus-visible,
.udj-mobile-menu button:focus-visible,
.navigation.pagination a:focus-visible {
  outline: 3px solid #a84409;
  outline-offset: 3px;
}
.udj-site-footer a:focus-visible,
.udj-final-cta a:focus-visible {
  outline: 3px solid #ffd392;
  outline-offset: 3px;
}

/* Small screens: no horizontal spill for narrow viewports or dense tags. */
@media (max-width: 760px) {
  .udj-breadcrumb,
  .udj-breadcrumb > span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .udj-article-meta {
    gap: 8px 12px;
  }
  .udj-article-meta .udj-chip {
    flex-shrink: 0;
  }
  .udj-toc__list {
    padding-right: 14px;
  }
  .udj-menu-button:hover,
  .udj-menu-button[aria-expanded="true"] {
    background: #a84409;
    border-color: #a84409;
    color: #fff;
  }
  .udj-mobile-menu__booking {
    background: linear-gradient(135deg, #a84409, #873405);
    color: #fff;
  }
  .udj-mobile-menu__booking small {
    color: #fff2e7;
  }
  .udj-mobile-menu__chips a {
    min-height: 44px;
  }
  .udj-mobile-menu__chips a:hover {
    background: #a84409;
    border-color: #a84409;
    color: #fff;
  }
  .udj-mobile-menu__clinic {
    grid-template-columns: 42px minmax(0,1fr) 44px;
  }
  .udj-mobile-menu__clinic > a,
  .udj-mobile-submenu-toggle {
    width: 44px;
    height: 44px;
  }
  .udj-footer-menu,
  .udj-footer-info {
    min-width: 0;
  }
  .udj-mobile-menu__list {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .udj-button:hover,
  .udj-mobile-menu__list > li > a:hover {
    transform: none;
  }
}


/* Dark introductory panel: the global dark-copper eyebrow must not
 * be reused on charcoal. Warm ivory/gold retains brand identity. */
.udj-first-guide .udj-eyebrow {
  color: #ffd392;
}

/* Inline editorial links are frequent in medical articles.
 * Expand their hit boxes on touch screens without making paragraphs
 * block-level or changing the table's horizontal-scroll mechanics. */
@media (max-width: 760px) {
  .udj-entry-content p a[href]:not([class*="button"]):not([class*="cta"]),
  .udj-entry-content blockquote a[href]:not([class*="button"]) {
    padding: 6px 4px;
    border-radius: 4px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
  .udj-entry-content p a[href] + a[href] {
    margin-left: 6px;
  }
  .udj-entry-content .udj-toc a[href] {
    min-height: 44px;
  }
}

/* Day 19 follow-up: homepage-specific low-contrast informational labels. */
.udj-treatment-row__number,
.udj-treatment-row__visual span,
.udj-feature-article__placeholder,
.udj-editorial__principles span {
  color: #88430f;
}
.udj-treatment-row__number {
  color: #65554a;
}

/* Links inside comparison tables and standalone related lists are not
 * continuous sentence links: give them substantial touch rectangles. */
@media (max-width: 760px) {
  .udj-entry-content li > a[href],
  .udj-entry-content th a[href],
  .udj-entry-content td a[href],
  .udj-entry-content .ud17-scroll a[href],
  .udj-entry-content .ud18-scroll a[href] {
    display: inline-block;
    vertical-align: middle;
    min-height: 36px;
    padding: 6px 5px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .udj-entry-content li > a[href] + a[href] {
    margin-left: 8px;
  }
  .udj-article-main .udj-toc__list a {
    min-height: 48px;
    padding: 10px 10px;
  }
  .udj-article-header .udj-breadcrumb a {
    min-height: 44px;
    padding: 9px 8px;
  }
  .udj-related .udj-article-card__title a {
    display: block;
    min-height: 44px;
    padding: 5px 0;
    line-height: 1.55;
  }
}

