/**
 * 無障礙 AA 字型單位修正
 * 覆蓋外掛/佈景主題中使用 px/ex/pt 的 font-size
 * 轉換基準：16px = 1rem
 *
 * @package EZC
 * @since 1.3.0
 */

/* ============================================
   JetEngine 修正
   ============================================ */

/* Listing Grid */
.jet-listing-grid__item,
.jet-listing-dynamic-field__content,
.jet-listing-dynamic-link__label {
    font-size: inherit;
}

/* Dynamic Field */
.jet-listing-dynamic-field {
    font-size: inherit;
}

/* Slider */
.jet-slider__title {
    font-size: 1.5rem; /* 原 24px */
}

.jet-slider__subtitle {
    font-size: 1rem; /* 原 16px */
}

.jet-slider__desc {
    font-size: 0.875rem; /* 原 14px */
}

/* Calendar */
.jet-calendar-week__day-date {
    font-size: 0.875rem; /* 原 14px */
}

.jet-calendar-week__day-name {
    font-size: 0.75rem; /* 原 12px */
}

/* Tabs */
.jet-tabs__label-text {
    font-size: inherit;
}

/* ============================================
   Pojo Accessibility 修正
   ============================================ */

.pojo-a11y-toolbar-toggle,
.pojo-a11y-toolbar-link {
    font-size: 1rem !important;
}

.pojo-a11y-toolbar-tooltip {
    font-size: 0.875rem !important; /* 原 14px */
}

/* ============================================
   The7 Theme 修正
   ============================================ */

/* Icon Box Widget - 覆蓋 the7-icon-box-widget.min.css */

/* 修正 .elementor-icon 的 font-size: 32px */
.the7-box-wrapper .elementor-icon,
.elementor-icon-div .elementor-icon {
    font-size: 1rem !important; /* 原 32px */
}

.the7-widget.the7-icon-box-widget .box-title,
.the7-icon-box-widget .box-title,
.elementor-widget-the7-icon-box .box-title {
    font-size: inherit;
}

.the7-widget.the7-icon-box-widget .box-content,
.the7-icon-box-widget .box-content,
.elementor-widget-the7-icon-box .box-content {
    font-size: inherit;
}

.the7-widget.the7-icon-box-widget .box-icon,
.the7-icon-box-widget .box-icon,
.elementor-widget-the7-icon-box .box-icon {
    font-size: inherit;
}

/* The7 Icon Box 其他常見字型大小 */
.the7-icon-box-widget .the7-box-title,
.the7-icon-box-widget .the7-box-content,
.the7-icon-box-widget .the7-box-description,
.the7-box-wrapper .box-heading,
.the7-box-wrapper .box-description {
    font-size: inherit;
}

/* 通用標題 */
.dt-the7 h1,
.dt-the7 h2,
.dt-the7 h3,
.dt-the7 h4,
.dt-the7 h5,
.dt-the7 h6 {
    font-size: inherit;
}

/* ============================================
   wf-container font-size: 0 繼承問題
   ============================================ */

/* wf-container 用 font-size: 0 消除 inline-block 間距，
   子層 font: 1em/1.7em 的 1em 相對父層 0px = 0px，
   無障礙功能啟用時文字會消失。改用 rem 脫離父層繼承 */
.wf-container > * {
    font-size: 1rem;
}

/* ============================================
   通用修正 - 常見問題選擇器
   ============================================ */

/* 使用 ex 單位的常見選擇器 */
[style*="font-size"][style*="ex"] {
    font-size: inherit !important;
}

/* 確保表單元素可放大 */
input,
textarea,
select,
button {
    font-size: 1rem;
}

/* 小字提示文字 */
.small,
small,
.text-small,
.caption {
    font-size: 0.875rem; /* 原 14px */
}

/* 極小文字 - 確保最小 12px (0.75rem) */
.text-xs,
.text-tiny,
.mini {
    font-size: 0.75rem; /* 最小建議值 */
}

/* ============================================
   無障礙輔助樣式
   ============================================ */

/* 螢幕閱讀器專用文字 (視覺隱藏但可被讀取) */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
