/**
 * Encore Authentication Modal Styles
 * 安可印刷旗艦版 - 會員登入 / 快速註冊 / 忘記密碼 彈跳視窗視覺樣式
 */

/* ─── 彈窗根容器 (固定覆蓋層) ─── */
.encore-auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.encore-auth-modal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ─── 磨砂玻璃背景遮罩 ─── */
.encore-auth-scrim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

/* ─── 彈跳視窗主體 ─── */
.encore-auth-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.8);
  padding: 32px 28px 24px;
  box-sizing: border-box;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.encore-auth-modal.is-active .encore-auth-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ─── 關閉按鈕 ─── */
.encore-auth-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 10;
}

.encore-auth-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

/* ─── 品牌 Header ─── */
.encore-auth-head {
  text-align: center;
  margin-bottom: 22px;
}

.encore-auth-logo {
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
}

.encore-auth-subhead {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  font-weight: 500;
}

/* ─── 頂部切換 Tabs (登入 / 註冊) ─── */
.encore-auth-tabs {
  display: flex;
  background: #f8fafc;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
  position: relative;
}

.encore-auth-tab {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.encore-auth-tab.is-active {
  background: #ffffff;
  color: #B00000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ─── 狀態提示 Alert ─── */
.encore-auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 18px;
  animation: encoreFadeIn 0.2s ease;
  box-sizing: border-box;
}

@keyframes encoreFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.encore-auth-alert.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.encore-auth-alert.is-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

.encore-auth-alert.is-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
}

.encore-alert-ic {
  flex-shrink: 0;
}

/* ─── 表單欄位 ─── */
.encore-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.encore-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.encore-auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.encore-auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.encore-auth-input-wrap .field-ic {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
}

.encore-auth-input-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 42px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: inherit;
}

.encore-auth-input-wrap input:focus {
  border-color: #B00000;
  box-shadow: 0 0 0 3.5px rgba(176, 0, 0, 0.12);
}

.encore-auth-input-wrap input:focus + .field-ic,
.encore-auth-input-wrap input:focus ~ .field-ic {
  color: #B00000;
}

.encore-auth-input-wrap input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

/* 密碼眼睛按鈕 */
.encore-toggle-pwd-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease;
  z-index: 5;
}

.encore-toggle-pwd-btn:hover {
  color: #0f172a;
}

/* 徹底消除 WooCommerce / Blocksy / 外部外掛注入之重複眼睛圖示 */
.encore-auth-input-wrap .show-password-input,
.encore-auth-input-wrap .wc-password-toggle,
.encore-auth-form .show-password-input,
.encore-auth-form .wc-password-toggle,
.woocommerce-input-wrapper .show-password-input {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 隱藏微軟 Edge 與瀏覽器原生重複眼睛 */
.encore-auth-input-wrap input::-ms-reveal,
.encore-auth-input-wrap input::-ms-clear {
  display: none !important;
}

/* 確保瀏覽器自動填入 (Autofill) 背景柔和不閃爍 */
.encore-auth-input-wrap input:-webkit-autofill,
.encore-auth-input-wrap input:-webkit-autofill:hover,
.encore-auth-input-wrap input:-webkit-autofill:focus,
.encore-auth-input-wrap input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #fefce8 inset !important;
  -webkit-text-fill-color: #0f172a !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ─── 密碼強度檢測條 ─── */
.encore-pwd-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.encore-pwd-strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}

.encore-pwd-strength-bars .bar {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: background-color 0.25s ease;
}

.strength-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  min-width: 50px;
  text-align: right;
}

/* 強度等級樣式 */
.encore-pwd-strength.is-weak .bar-1 { background: #ef4444; }
.encore-pwd-strength.is-weak .strength-label { color: #ef4444; }

.encore-pwd-strength.is-medium .bar-1,
.encore-pwd-strength.is-medium .bar-2 { background: #f59e0b; }
.encore-pwd-strength.is-medium .strength-label { color: #d97706; }

.encore-pwd-strength.is-strong .bar-1,
.encore-pwd-strength.is-strong .bar-2,
.encore-pwd-strength.is-strong .bar-3 { background: #10b981; }
.encore-pwd-strength.is-strong .strength-label { color: #059669; }

/* ─── 表單輔助列 (記住我 / 忘記密碼) ─── */
.encore-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.encore-auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.encore-auth-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #B00000;
  cursor: pointer;
  margin: 0;
}

.encore-auth-link-btn {
  background: none;
  border: none;
  color: #B00000;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.encore-auth-link-btn:hover {
  color: #8A0000;
  text-decoration: underline;
}

/* ─── 提交按鈕 ─── */
.encore-auth-submit-btn {
  width: 100%;
  height: 46px;
  background: linear-gradient(135deg, #B00000 0%, #900000 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  box-shadow: 0 4px 14px rgba(176, 0, 0, 0.28);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.encore-auth-submit-btn:hover {
  background: linear-gradient(135deg, #c40000 0%, #a00000 100%);
  box-shadow: 0 6px 20px rgba(176, 0, 0, 0.38);
  transform: translateY(-1px);
}

.encore-auth-submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(176, 0, 0, 0.2);
}

.encore-auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* 旋轉加載指示器 */
.btn-spinner {
  animation: encoreSpin 0.8s linear infinite;
}

@keyframes encoreSpin {
  100% { transform: rotate(360deg); }
}

/* ─── 忘記密碼相關 ─── */
.encore-forgot-intro {
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 10px;
}

.encore-auth-back-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* ─── 社群快速登入按鈕區 ─── */
.encore-social-auth-section {
  margin-top: 22px;
}

.encore-social-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}

.encore-social-divider::before,
.encore-social-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.encore-social-divider span {
  padding: 0 12px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.encore-social-btns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.encore-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* 1. LINE 按鈕 */
.encore-social-btn.encore-social-line {
  background: #06C755;
  color: #ffffff;
}
.encore-social-btn.encore-social-line:hover {
  background: #05b34c;
  box-shadow: 0 3px 10px rgba(6, 199, 85, 0.3);
  transform: translateY(-1px);
}

/* 2. Google 按鈕 */
.encore-social-btn.encore-social-google {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #e2e8f0;
}
.encore-social-btn.encore-social-google:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

/* 3. Facebook 按鈕 */
.encore-social-btn.encore-social-fb {
  background: #1877F2;
  color: #ffffff;
}
.encore-social-btn.encore-social-fb:hover {
  background: #166fe5;
  box-shadow: 0 3px 10px rgba(24, 119, 242, 0.3);
  transform: translateY(-1px);
}

/* ─── 底部安全加密宣告 ─── */
.encore-auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 11.5px;
  color: #94a3b8;
}

.encore-auth-footer .ic-lock {
  color: #10b981;
}

/* ─── 手機端 RWD 優化 ─── */
@media (max-width: 480px) {
  .encore-auth-dialog {
    padding: 24px 18px 20px;
    border-radius: 16px;
  }
  .encore-social-btns-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ─── 全頁獨立認證中心樣式 (針對 /my-account/ 等直接訪問頁面) ─── */
.encore-page-auth-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 70vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 40px 16px !important;
  box-sizing: border-box !important;
  background: radial-gradient(circle at 50% 10%, rgba(176, 0, 0, 0.04) 0%, rgba(248, 250, 252, 0.6) 100%) !important;
}

.encore-page-auth-card {
  width: 100% !important;
  max-width: 440px !important;
  margin: 0 auto !important;
  background: #ffffff !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px #e2e8f0 !important;
  padding: 36px 32px 28px !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  .encore-page-auth-card {
    padding: 24px 18px 20px !important;
    border-radius: 16px !important;
  }
}

.encore-wc-notices-wrap {
  margin-bottom: 16px;
}

.encore-wc-notices-wrap .woocommerce-error,
.encore-wc-notices-wrap .woocommerce-info,
.encore-wc-notices-wrap .woocommerce-message {
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  margin-bottom: 14px !important;
  list-style: none !important;
}

.encore-wc-notices-wrap .woocommerce-error {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
}

.encore-wc-notices-wrap .woocommerce-message {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #16a34a !important;
}

/* 覆蓋 Blocksy 或 WooCommerce 原生多餘的標籤外觀 */
.woocommerce-account .woocommerce-MyAccount-content form.login,
.woocommerce-account .woocommerce-MyAccount-content form.register,
.woocommerce form.login,
.woocommerce form.register {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* ─── Header 尊榮會員下拉面板專屬樣式 ─── */
.encore-user-dropdown {
  min-width: 295px !important;
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.9) !important;
}

.encore-ud-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
}

.encore-ud-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.encore-ud-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #B00000 0%, #dc2626 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(176, 0, 0, 0.35);
}

.encore-ud-online-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f172a;
}

.encore-ud-info {
  flex: 1;
  min-width: 0;
}

.encore-ud-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.encore-ud-profile-card .encore-ud-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.encore-ud-vip-badge {
  font-size: 10px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.encore-ud-email {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4 大快捷統計膠囊 */
.encore-ud-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 8px;
  gap: 5px;
}

.encore-ud-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.18s ease;
  min-height: 48px;
}

.encore-ud-stat-item:hover {
  border-color: #B00000;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.encore-ud-stat-item .stat-num {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.encore-ud-stat-item .stat-lbl {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
}

.encore-ud-stat-item .stat-lbl-sub {
  display: block;
  font-size: 8.5px;
  color: #94a3b8;
  font-weight: normal;
  line-height: 1;
  margin-top: 1px;
}

/* 4 大功能清單 */
.encore-ud-premium-list {
  padding: 8px 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

.encore-ud-premium-list li a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 18px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}

.encore-ud-premium-list li a:hover {
  background: #f1f5f9 !important;
  color: #B00000 !important;
}

.encore-ud-premium-list .ud-ic {
  color: #94a3b8;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.encore-ud-premium-list li a:hover .ud-ic {
  color: #B00000;
}

.encore-ud-premium-list .ud-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: #ef4444;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 999px;
}

/* 登出按鈕 */
.encore-ud-logout-wrap {
  padding: 6px 14px 12px;
  border-top: 1px solid #f1f5f9;
}

.encore-ud-logout-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  padding: 8px 0 !important;
  border-radius: 8px !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
}

.encore-ud-logout-btn:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

/* ─── WordPress 管理員黑色工具列層級與顯示保證 ─── */
#wpadminbar {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 99999999 !important;
}

html.admin-bar,
body.admin-bar {
  margin-top: 32px !important;
}

@media screen and (max-width: 782px) {
  html.admin-bar,
  body.admin-bar {
    margin-top: 46px !important;
  }
}

body.admin-bar .encore-header-wrapper.is-sticky {
  top: 32px !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar .encore-header-wrapper.is-sticky {
    top: 46px !important;
  }
}



