/* =============================================================
   GPSEO Quote List – Frontend Styles  v1.3
   ============================================================= */

:root {
  --wcql-blue:     #3874c0;
  --wcql-blue-dk:  #2e62a8;
  --wcql-blue-lt:  #edf3fb;
  --wcql-ink:      #1a1f2b;
  --wcql-gray:     #8a93a3;
  --wcql-border:   #e6e9ee;
  --wcql-bg-soft:  #f7f9fc;
  --wcql-radius:   8px;
  --wcql-trans:    .18s ease;
}

/* ═══════════════════════════════════════════════════════════
   产品页按钮组
════════════════════════════════════════════════════════════ */
.wcql-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* 已选变体的 SKU 显示 */
.wcql-variation-sku {
  margin: 10px 0 0;
  font-size: 0.88em;
  color: var(--wcql-gray, #8a93a3);
}
.wcql-variation-sku-label {
  font-weight: 600;
  color: #555;
  margin-right: 4px;
}
.wcql-variation-sku-value {
  font-family: monospace;
  color: var(--wcql-blue);
  letter-spacing: .01em;
}

.woocommerce-variation-add-to-cart .single_add_to_cart_button {
  display: none !important;
}

.wcql-btn-atq,
.wcql-btn-quotenow {
  padding: 12px 26px !important;
  border-radius: var(--wcql-radius) !important;
  font-size: 0.95em !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
  cursor: pointer !important;
  transition: all var(--wcql-trans) !important;
  white-space: nowrap;
  line-height: 1.4 !important;
}

.wcql-btn-atq {
  background: var(--wcql-blue) !important;
  color: #fff !important;
  border: 2px solid var(--wcql-blue) !important;
}
.wcql-btn-atq:hover:not(:disabled) {
  background: var(--wcql-blue-dk) !important;
  border-color: var(--wcql-blue-dk) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56,116,192,.35) !important;
}

.wcql-btn-quotenow {
  background: #fff !important;
  color: var(--wcql-blue) !important;
  border: 2px solid var(--wcql-blue) !important;
}
.wcql-btn-quotenow:hover:not(:disabled) {
  background: var(--wcql-blue-lt) !important;
  transform: translateY(-1px);
}

.wcql-disabled,
.wcql-btn-atq:disabled,
.wcql-btn-quotenow:disabled {
  opacity: .4 !important;
  cursor: not-allowed !important;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

.wcql-loop-btn {
  font-size: 0.85em !important;
  background: var(--wcql-blue) !important;
  color: #fff !important;
  border: none !important;
}
.wcql-loop-btn:hover { background: var(--wcql-blue-dk) !important; }

/* ═══════════════════════════════════════════════════════════
   Quote Now 弹窗
════════════════════════════════════════════════════════════ */
.wcql-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--wcql-trans), visibility var(--wcql-trans);
}
.wcql-overlay.active { opacity: 1; visibility: visible; }

.wcql-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(15,23,42,.28);
  overflow: hidden;
  position: relative;
  transform: translateY(14px) scale(.97);
  transition: transform var(--wcql-trans);
}
.wcql-overlay.active .wcql-modal { transform: translateY(0) scale(1); }

/* ── 关闭按钮：右上角内侧，正圆形浅灰底 ──
   用 !important 强制覆盖主题对 <button> 标签的全局样式（圆角药丸等） */
.wcql-modal-x {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15,23,42,.06) !important;
  border: none !important;
  border-radius: 50% !important;
  font-size: 16px !important;
  line-height: 1 !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transition: background var(--wcql-trans), color var(--wcql-trans) !important;
  z-index: 5 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
}
.wcql-modal-x:hover {
  background: rgba(15,23,42,.12);
  color: #1a1f2b;
}

/* 产品信息区（右侧留白避开关闭按钮） */
.wcql-modal-product {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 48px 16px 20px;
  background: var(--wcql-bg-soft);
  border-bottom: 1px solid var(--wcql-border);
}
.wcql-modal-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid #e8e8e8;
  background: #fff;
}
.wcql-modal-meta { flex: 1; min-width: 0; }
.wcql-modal-title {
  font-weight: 700;
  font-size: 0.97em;
  color: var(--wcql-ink);
  margin: 0 0 5px;
  line-height: 1.35;
}
.wcql-modal-sku {
  font-size: 0.78em;
  color: #a3aab8;
  margin: 0 0 5px;
  font-family: monospace;
  letter-spacing: .02em;
}
.wcql-modal-attrs {
  font-size: 0.82em;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* 表单 */
.wcql-modal-form { padding: 18px 20px 6px; }

.wcql-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.wcql-field-row .wcql-field { margin-bottom: 0; }
@media (max-width: 420px) {
  .wcql-field-row { grid-template-columns: 1fr; }
}

.wcql-field { margin-bottom: 14px; }
.wcql-field label {
  display: block;
  font-size: 0.78em;
  font-weight: 700;
  color: #555;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.wcql-field label em { color: var(--wcql-blue); font-style: normal; }

.wcql-field input,
.wcql-field-ta {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--wcql-border);
  border-radius: var(--wcql-radius);
  font-size: 0.95em;
  transition: border-color var(--wcql-trans), box-shadow var(--wcql-trans);
  box-sizing: border-box;
  background: #fff;
  font-family: inherit;
}
.wcql-field-ta { resize: vertical; }
.wcql-field input:focus,
.wcql-field-ta:focus {
  border-color: var(--wcql-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(56,116,192,.12);
}

.wcql-modal-msg {
  font-size: 0.86em;
  margin: 4px 0 0;
  min-height: 18px;
}
.wcql-modal-msg.ok  { color: #1e8449; font-weight: 600; }
.wcql-modal-msg.err { color: #c0392b; font-weight: 600; }

.wcql-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--wcql-border);
}

.wcql-btn-secondary {
  background: #fff !important;
  color: #666 !important;
  border: 1.5px solid #ddd !important;
  padding: 10px 22px !important;
  border-radius: var(--wcql-radius) !important;
  font-size: 0.9em !important;
  cursor: pointer !important;
  transition: border-color var(--wcql-trans), color var(--wcql-trans) !important;
}
.wcql-btn-secondary:hover { border-color: #aaa !important; color: #333 !important; }

.wcql-btn-primary {
  background: var(--wcql-blue) !important;
  color: #fff !important;
  border: none !important;
  padding: 10px 28px !important;
  border-radius: var(--wcql-radius) !important;
  font-size: 0.9em !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background var(--wcql-trans), box-shadow var(--wcql-trans) !important;
  min-width: 100px;
  letter-spacing: .02em;
}
.wcql-btn-primary:hover:not(:disabled) {
  background: var(--wcql-blue-dk) !important;
  box-shadow: 0 4px 12px rgba(56,116,192,.35) !important;
}
.wcql-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

body.wcql-modal-open { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════
   Quote List 页面
════════════════════════════════════════════════════════════ */
.wcql-page-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 8px 16px 40px;
}

/* 空状态 */
.wcql-empty {
  text-align: center;
  padding: 72px 20px;
  color: var(--wcql-gray);
}
.wcql-empty svg { margin-bottom: 18px; opacity: .22; color: var(--wcql-blue); }
.wcql-empty p { font-size: 1.05em; margin: 0 0 22px; color: #98a2b3; }

/* 卡片容器 */
.wcql-list-card {
  background: #fff;
  border: 1px solid var(--wcql-border);
  border-bottom: 1px solid var(--wcql-border);
  border-radius: var(--wcql-card-radius, 0px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}

/* 表格 */
.wcql-list-table {
  width: 100%;
  border-collapse: collapse;
  margin-block-end: 0;
  margin: 0;
}
.wcql-list-table thead th {
  padding: 14px 18px;
  background: var(--wcql-bg-soft);
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #98a2b3;
  text-align: left;
  border-bottom: 1px solid var(--wcql-border);
}
.wcql-th-img {
  width: 12%;
}
.wcql-th-sku {
  width: 15%;
}
.wcql-list-table tbody td {
  padding: 16px 18px;
  vertical-align: middle;
  background: transparent !important;
}
.wcql-list-table tbody tr {
  transition: background var(--wcql-trans);
}
.wcql-list-table tbody tr:nth-child(odd) td,
.wcql-list-table tbody tr:nth-child(even) td {
  background: transparent !important;
}
.wcql-list-table tbody tr:hover td { background: var(--wcql-bg-soft) !important; }

.wcql-item-thumb {
  width: var(--wcql-thumb-size, 100px);
  height: var(--wcql-thumb-size, 100px);
  object-fit: cover;
  border-radius: var(--wcql-img-radius, 8px);
  border: 1px solid var(--wcql-border);
  display: block;
  background: #fafafa;
}
.wcql-item-thumb.wcql-no-img { background: #f0f0f0; }

.wcql-thumb-link {
  display: block;
  width: var(--wcql-thumb-size, 100px);
  height: var(--wcql-thumb-size, 100px);
  transition: opacity var(--wcql-trans);
}
.wcql-thumb-link:hover { opacity: .8; }

.wcql-item-name-link {
  text-decoration: none;
  display: block;
}
.wcql-item-name-link:hover .wcql-item-name {
  color: var(--wcql-blue);
}

.wcql-item-name {
  font-weight: 600;
  font-size: 0.98em;
  color: var(--wcql-ink);
  margin: 0 0 5px;
  line-height: 1.4;
}
.wcql-item-attrs {
  font-size: 1em;
  color: var(--wcql-gray);
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.6;
}
.wcql-item-attrs li {
  margin: 0;
  padding: 0;
}
.wcql-item-sku {
  font-size: 1em;
  color: var(--wcql-blue);
  font-family: monospace;
  letter-spacing: .01em;
}

.wcql-qty {
  width: 58px;
  padding: 7px 8px;
  border: 1.5px solid var(--wcql-border);
  border-radius: 6px;
  text-align: center;
  font-size: 0.92em;
  color: var(--wcql-ink);
  transition: border-color var(--wcql-trans);
}
.wcql-qty:focus { border-color: var(--wcql-blue); outline: none; }

.wcql-remove-btn {
  background: #aab2c0 !important;
  border: none !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background var(--wcql-trans) !important;
  line-height: 1 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
}
.wcql-remove-btn:hover { background: #e02424 !important; color: #fff !important; }

/* 操作栏 */
.wcql-actions-bar {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
}
.wcql-action-continue {
  background: #fff !important;
  color: #555 !important;
  border: 1.5px solid #d8dce3 !important;
  padding: 12px 24px !important;
  border-radius: var(--wcql-radius) !important;
  font-size: 0.9em !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-decoration: none;
  display: inline-block;
  transition: border-color var(--wcql-trans), color var(--wcql-trans) !important;
}
.wcql-action-continue:hover { border-color: #aab1bd !important; color: #1a1f2b !important; }

.wcql-action-submit {
  background: var(--wcql-blue) !important;
  color: #fff !important;
  border: none !important;
  padding: 13px 32px !important;
  border-radius: var(--wcql-radius) !important;
  font-size: 0.92em !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background var(--wcql-trans), box-shadow var(--wcql-trans) !important;
  letter-spacing: .02em;
}
.wcql-action-submit:hover {
  background: var(--wcql-blue-dk) !important;
  box-shadow: 0 6px 16px rgba(56,116,192,.32) !important;
}

/* 提交全部弹窗 */
.wcql-submit-modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--wcql-trans), visibility var(--wcql-trans);
}
.wcql-submit-modal.active { opacity: 1; visibility: visible; }
.wcql-submit-modal .wcql-modal { transform: translateY(14px) scale(.97); }
.wcql-submit-modal.active .wcql-modal { transform: translateY(0) scale(1); }

.wcql-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px 0 20px;
}
.wcql-modal-header h3 {
  font-size: 1.05em;
  margin: 0;
  color: var(--wcql-ink);
  font-weight: 700;
}
.wcql-modal-header-desc {
  font-size: 0.86em;
  color: #98a2b3;
  margin: 4px 0 0;
}

.wcql-notice { min-height: 18px; font-size: 0.86em; margin: 0; }
.wcql-notice.ok  { color: #1e8449; font-weight: 600; }
.wcql-notice.err { color: #c0392b; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   悬浮 Widget（右下角）
════════════════════════════════════════════════════════════ */
#wcql-float-widget {
  position: fixed;
  bottom: 32px;
  right: 28px;
  z-index: 99990;
}

#wcql-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--wcql-blue);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(56,116,192,.4);
  text-decoration: none;
  position: relative;
  transition: background var(--wcql-trans), transform var(--wcql-trans), box-shadow var(--wcql-trans);
}
#wcql-float-btn:hover {
  background: var(--wcql-blue-dk);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(56,116,192,.45);
}

.wcql-float-icon { width: 22px; height: 22px; display: block; flex-shrink: 0; }

#wcql-float-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e02424;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
  line-height: 1;
  box-sizing: border-box;
}
#wcql-float-badge.wcql-pop { animation: wcqlPop .3s ease; }
@keyframes wcqlPop {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.55); }
}

#wcql-float-panel {
  position: absolute;
  bottom: 62px;
  right: 0;
  width: 300px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 36px rgba(15,23,42,.18);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.96);
  transition: opacity var(--wcql-trans), visibility var(--wcql-trans), transform var(--wcql-trans);
  pointer-events: none;
}
#wcql-float-widget:hover #wcql-float-panel,
#wcql-float-widget:focus-within #wcql-float-panel,
#wcql-float-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.wcql-fp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 15px;
  background: var(--wcql-bg-soft);
  border-bottom: 1px solid var(--wcql-border);
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #555;
}
#wcql-float-panel-count { font-weight: 400; color: #bbb; text-transform: none; letter-spacing: 0; }

.wcql-fp-body {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px 0;
}
.wcql-fp-body::-webkit-scrollbar { width: 3px; }
.wcql-fp-body::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 2px; }

.wcql-float-empty {
  text-align: center;
  color: #bbb;
  font-size: 0.85em;
  padding: 22px 16px;
  margin: 0;
}

.wcql-float-list { list-style: none; margin: 0; padding: 0; }
.wcql-fi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  transition: background var(--wcql-trans);
}
.wcql-fi:hover { background: #fafbfd; }

.wcql-float-thumb {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid #eee;
  display: block;
}
.wcql-no-img { background: #f0f0f0; }

.wcql-fi-info { flex: 1; min-width: 0; }
.wcql-fi-name {
  font-size: 0.83em;
  font-weight: 500;
  color: #222;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wcql-fi-attr {
  font-size: 0.76em;
  color: #aaa;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wcql-fi-qty { font-size: 0.8em; color: #bbb; flex-shrink: 0; }
.wcql-fi-more {
  font-size: 0.78em;
  color: #ccc;
  text-align: center;
  padding: 4px 14px 8px;
  list-style: none;
}

.wcql-fp-footer { padding: 10px 14px 14px; border-top: 1px solid var(--wcql-border); }
.wcql-fp-goto {
  display: block;
  text-align: center;
  padding: 9px !important;
  font-size: 0.86em !important;
  font-weight: 700 !important;
  background: var(--wcql-blue) !important;
  color: #fff !important;
  border-radius: var(--wcql-radius) !important;
  text-decoration: none;
  transition: background var(--wcql-trans) !important;
  border: none !important;
  letter-spacing: .02em;
}
.wcql-fp-goto:hover { background: var(--wcql-blue-dk) !important; }

/* ── 响应式 ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .wcql-list-table .wcql-col-sku { display: none; }
  .wcql-list-table thead th,
  .wcql-list-table tbody td { padding: 12px 10px; }
  .wcql-item-thumb { width: 46px; height: 46px; }
}

@media (max-width: 500px) {
  #wcql-float-widget { bottom: 20px; right: 16px; }
  #wcql-float-panel { right: 0; width: min(300px, calc(100vw - 32px)); }
  .wcql-actions-bar { flex-direction: column; align-items: stretch; }
  .wcql-action-continue,
  .wcql-action-submit { width: 100%; text-align: center; }
}
