/* =========================================
   Block: 無障礙浮動工具列容器 (Clean Version)
   ========================================= */
.a11y-widget {
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.a11y-group {
  position: relative;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

/* =========================================
   Element: 按鈕樣式
   ========================================= */
.a11y-widget__btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--secondary-color-1, #34495e);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.a11y-widget__btn:hover {
  transform: translateY(-2px);
  background-color: #2c3e50;
}

.a11y-widget__btn img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

/* =========================================
   Element: 面板 (共用)
   ========================================= */
.a11y-widget__panel {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background-color: #000;
  border-radius: 50px;
  padding: 6px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.a11y-widget__panel.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* =========================================
   Special: 字體面板
   ========================================= */
.font-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.a11y-option-btn {
  background: transparent;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.a11y-option-btn.is-active {
  background-color: #a93226;
  font-weight: 700;
}

/* =========================================
   Special: 翻譯面板
   ========================================= */
.translate-panel {
  background-color: #fff;
  border-radius: 8px;
  padding: 10px;
  min-width: 150px;
  display: block;
}

/* =========================================
   Google 翻譯基礎設定 (細節由 JS Inject 覆蓋)
   ========================================= */
.goog-te-gadget {
  color: transparent !important;
  margin: 0 !important;
}

.goog-te-gadget img {
  display: none !important;
}

/* 確保彈出選單可見 (不要隱藏) */
.goog-te-menu-frame {
  display: block !important;
  visibility: visible !important;
  z-index: 2147483647 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}
.goog-te-balloon-frame,
#goog-gt-tt {
  display: none !important;
}

/* RWD */
@media screen and (max-width: 768px) {
  .a11y-widget {
    bottom: 20px;
    right: 16px;
    gap: 10px;
  }
  .a11y-widget__panel {
    right: 55px;
  }
}
