/* Quote system shared styles */
/* -- Gemini Pro v2 品牌化設計 -- */
:root {
  --ezp-pink: #F47A94;
  --ezp-light-blue: #89CEE9;
  --ezp-brand-blue: #5997C7;
  --ezp-dark-blue: #003A5D;
  --ezp-cta-pink-hover: #e85c7c;
}

body.quote-page {
  background-color: #f4f7fa;
}

/* 詢價流程步驟指示器 - 統一橫條式設計（綠色主題） */
body.quote-page .flow-steps {
  margin-bottom: 1rem;
  margin-top: 0;
}

body.quote-page .flow-steps .flow-step-active {
  background-color: #198754 !important;
  color: white !important;
}

body.quote-page .flow-steps .flow-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  transition: all 0.3s ease;
}

body.quote-page .flow-steps .flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px;
  width: 20px;
  height: 2px;
  background-color: #dee2e6;
  z-index: 1;
}

body.quote-page .flow-steps .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}

body.quote-page .flow-steps .flow-step-active .step-number {
  background-color: white !important;
  color: #198754 !important;
  border-color: white !important;
}

@media (max-width: 767.98px) {
  body.quote-page .flow-steps .flow-step {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
  }

  body.quote-page .flow-steps .step-number {
    width: 22px;
    height: 22px;
    margin-right: 3px;
    font-size: 0.7rem;
  }

  body.quote-page .flow-steps .step-text {
    display: inline;
    font-size: 0.7rem;
  }
}

.quote-cart__table-wrapper {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.quote-cart__table thead {
  background: #f1f5f9;
  font-size: 0.95rem;
}

.quote-cart__thumb {
  width: 88px;
  height: 88px;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.quote-cart__name {
  display: inline-block;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}

.quote-cart__name:hover {
  color: #2563eb;
}

.quote-cart__attr,
.quote-cart__moq {
  font-size: 0.85rem;
  color: #64748b;
}

.quote-cart__note-label {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: #475569;
}

.quote-cart__note {
  min-height: 70px;
  resize: vertical;
  font-size: 0.9rem;
}

.quote-quantity {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.quote-quantity__btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

.quote-quantity__input {
  width: 80px;
  text-align: center;
  font-weight: 600;
}

.quote-cart__price {
  font-weight: 600;
  color: #0f172a;
}

.quote-cart__subtotal {
  font-weight: 700;
  font-size: 1.05rem;
  color: #16a34a;
}

.quote-cart__remove {
  text-decoration: none;
  font-size: 0.9rem;
}

.quote-cart__tips {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.12));
  padding: 1.5rem;
  border-radius: 1rem;
  color: #1e293b;
}

.quote-cart__tips ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.quote-cart__summary .card-body {
  border-radius: 1rem;
}

.quote-counter .quote-count-text {
  font-size: 0.75rem;
  color: #6c757d;
}

.quote-counter .quote-quantity {
  font-size: 0.95rem;
  color: #0f172a;
}

.quote-summary__list {
  margin: 0;
  padding: 0;
}

.quote-summary__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.95rem;
}

.quote-summary__item:last-child {
  border-bottom: none;
}

.quote-empty {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.quote-empty__icon {
  font-size: 3.2rem;
  color: #2563eb;
  margin-bottom: 1rem;
}

.quote-section__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ezp-dark-blue);
  border-left: 4px solid var(--ezp-brand-blue);
  padding-left: 0.8rem;
}

.quote-section__title i {
  color: var(--ezp-brand-blue);
}

.quote-summary-card {
  border-radius: 1rem;
}

.quote-summary__totals > div {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: #334155;
}

.quote-support {
  border-radius: 1rem;
  background: #eff6ff;
}

.quote-support a {
  color: #2563eb;
  text-decoration: none;
}

.quote-success {
  border-radius: 1.5rem;
}

.quote-success__icon {
  font-size: 3.5rem;
}

.quote-success__meta {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.quote-next-step {
  border-radius: 1rem;
}

.quote-detail {
  border-radius: 1.25rem;
}

.quote-detail__panel {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
}

.quote-detail__table thead {
  background: #eff6ff;
}

.quote-detail__status .badge {
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
}

.badge.bg-status-0 {
  background-color: #f97316;
}

.badge.bg-status-1 {
  background-color: #2563eb;
}

.badge.bg-status-2 {
  background-color: #16a34a;
}

.badge.bg-status-3 {
  background-color: #9ca3af;
}

@media (max-width: 992px) {
  .quote-cart__table {
    font-size: 0.92rem;
  }

  .quote-progress {
    gap: 0.5rem;
  }

  .quote-progress__number {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
  }
}

/* ===== 手機版卡片式排版 ===== */
.quote-cart__mobile-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.quote-cart__mobile-card .quote-cart__thumb {
  width: 72px;
  height: 72px;
}

.quote-cart__mobile-card .quote-cart__name {
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quote-cart__mobile-card .quote-cart__note {
  min-height: 80px;
  font-size: 0.9rem;
  resize: vertical;
}

.quote-cart__mobile-card .quote-quantity {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.quote-cart__mobile-card .quote-quantity__btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 1.1rem;
}

.quote-cart__mobile-card .quote-quantity__input {
  width: 64px;
  height: 40px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}

.quote-cart__mobile-card .quote-cart__price {
  font-size: 0.85rem;
  color: #64748b;
}

.quote-cart__mobile-card .quote-cart__subtotal {
  font-size: 1.05rem;
  font-weight: 700;
  color: #16a34a;
}

.quote-cart__mobile-card .quote-cart__moq,
.quote-cart__mobile-card .quote-cart__attr {
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .quote-progress {
    flex-wrap: wrap;
  }

  .quote-progress__divider {
    flex: 0 0 24px;
  }
}

/* Loading Overlay - Step 間過渡效果 */
.quote-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.quote-loading-overlay.show {
  opacity: 1;
}

.quote-loading-content {
  text-align: center;
  padding: 2rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* 詢價流程說明區塊 */
.quote-flow-step {
  transition: transform 0.2s ease;
}

.quote-flow-step:hover {
  transform: translateY(-2px);
}

/* FAQ 摺疊區塊 */
details summary {
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

details summary:hover {
  color: #0d6efd;
}

details[open] summary {
  color: #198754;
}

/* Tooltip 圖示增強 */
.bi-info-circle {
  cursor: help;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.bi-info-circle:hover {
  opacity: 1;
}

/* 表單提示文字 */
.form-text {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

/* 商品備註標籤增強 */
.quote-cart__note-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ===== 手機版：詢價流程說明可收合提示 ===== */
.quote-flow-toggle {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  background: #eef6ff;
  border: 1px solid #d0e3f7;
  border-radius: 0.5rem;
  color: #0d6efd;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease;
}

.quote-flow-toggle:hover,
.quote-flow-toggle:focus {
  background: #dceeff;
  color: #0d6efd;
  text-decoration: none;
}

.quote-flow-toggle__arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.quote-flow-toggle[aria-expanded="true"] .quote-flow-toggle__arrow {
  transform: rotate(180deg);
}

/* ===== 手機版固定底部 CTA 欄 ===== */
.quote-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1035;
  background: #fff;
  border-top: 1px solid #dee2e6;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.quote-sticky-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  gap: 0.75rem;
}

.quote-sticky-cta__summary {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  flex-shrink: 0;
}

.quote-sticky-cta__count {
  font-size: 0.8rem;
  color: #6c757d;
}

.quote-sticky-cta__amount {
  font-size: 1rem;
  font-weight: 700;
  color: #dc3545;
}

.quote-sticky-cta__btn {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}

/* ===== 信任感標語 ===== */
.quote-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(89,151,199,0.06), rgba(0,58,93,0.04));
  border: 1px solid #dceaf3;
  border-radius: 8px;
  box-shadow: none;
}

.quote-trust-strip__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 1.2rem;
  white-space: nowrap;
}

.quote-trust-strip__item i {
  font-size: 1.1rem;
  color: var(--ezp-brand-blue, #5997C7);
}

.quote-trust-strip__item span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ezp-dark-blue);
  letter-spacing: 0;
}

.quote-trust-strip__divider {
  width: 1px;
  height: 18px;
  background: #c9d8e3;
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .quote-trust-strip {
    padding: 0.5rem 0.4rem;
  }
  .quote-trust-strip__item {
    padding: 0 0.6rem;
    gap: 4px;
  }
  .quote-trust-strip__item i {
    font-size: 0.95rem;
  }
  .quote-trust-strip__item span {
    font-size: 0.8rem;
  }
  .quote-trust-strip__divider {
    height: 14px;
  }
}

/* ===== 選填欄位展開按鈕 ===== */
.quote-optional-toggle {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  background: #f8f9fa;
  border: 1px dashed #ced4da;
  border-radius: 0.5rem;
  color: #6c757d;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.quote-optional-toggle:hover {
  background: #e9ecef;
  color: #495057;
  text-decoration: none;
}

.quote-optional-toggle__arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.quote-optional-toggle[aria-expanded="true"] .quote-optional-toggle__arrow {
  transform: rotate(180deg);
}

.quote-optional-toggle[aria-expanded="true"] .bi-plus-circle::before {
  content: "\F63C";
}

/* ===== 表單頁手機版固定底部 CTA ===== */
.quote-form-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1035;
  background: #fff;
  border-top: 1px solid #dee2e6;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  padding: 0.6rem 1rem;
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
}

.quote-form-sticky-cta .btn {
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem;
}

/* 表單頁手機版：隱藏底部導航選單、留出固定 CTA 空間 */
@media (max-width: 767.98px) {
  .quote-page .mobile-bottom-menu { display: none !important; }
  body.quote-page { padding-bottom: 72px !important; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ===== 精簡版 Header ===== */
.quote-header {
  background: var(--ezp-dark-blue);
  border-bottom: 3px solid var(--ezp-brand-blue);
  padding: 0.6rem 0;
}

.quote-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quote-header__logo img {
  height: 36px;
  width: auto;
}

.quote-header__center {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--ezp-light-blue);
  padding-left: 1rem;
  line-height: 1.2;
}

.quote-header__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.quote-header__tagline {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.5px;
}

.quote-header__badges {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quote-header__badges span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.quote-header__badges span i {
  color: var(--ezp-light-blue);
  margin-right: 3px;
}

.quote-header__back {
  font-size: 0.85rem;
  color: var(--ezp-light-blue);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.quote-header__back:hover {
  color: #fff;
}

@media (max-width: 991.98px) {
  .quote-header__badges { display: none; }
  .quote-header__back { margin-left: auto; }
}

@media (max-width: 575.98px) {
  .quote-header__logo img { height: 28px; }
  .quote-header__center { padding-left: 0.7rem; }
  .quote-header__title { font-size: 0.95rem; }
  .quote-header__tagline { font-size: 0.6rem; }
  .quote-header__back { font-size: 0.8rem; }
}

/* ===== CTA 按鈕品牌化 ===== */
.btn-success.quote-cta,
.quote-form-sticky-cta .btn-success {
  background-color: var(--ezp-pink) !important;
  border-color: var(--ezp-pink) !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1.1rem;
  padding: 0.8rem 1.5rem;
  transition: all 0.25s ease-out;
  box-shadow: 0 4px 15px rgba(244,122,148,0.3);
}

.btn-success.quote-cta:hover,
.quote-form-sticky-cta .btn-success:hover {
  background-color: var(--ezp-cta-pink-hover) !important;
  border-color: var(--ezp-cta-pink-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(244,122,148,0.4);
}

/* ===== 手機版固定底部 CTA 品牌化 ===== */
.quote-form-sticky-cta {
  box-shadow: 0 -4px 20px rgba(0,58,93,0.1);
  border-top-color: #e9f1f6;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(5px);
}

/* ===== 精簡版 Footer ===== */
.quote-footer {
  background: #f7fafd;
  border-top: 1px solid #e9f1f6;
  padding: 1rem 0 0.8rem;
  margin-top: 2rem;
  color: #556271;
  font-size: 0.85rem;
}

.quote-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.quote-footer__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.quote-footer__contact i {
  color: var(--ezp-brand-blue, #5997C7);
  margin-right: 3px;
}

.quote-footer__copy {
  text-align: center;
  font-size: 0.75rem;
  color: #a0aab8;
  margin-top: 0.5rem;
}

/* ===== 圖檔上傳區 ===== */
.quote-upload-zone {
  border: 2px dashed #c9d8e3;
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  background: #f7fafd;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.quote-upload-zone:hover,
.quote-upload-zone.dragover {
  border-color: var(--ezp-brand-blue);
  background: rgba(89,151,199,0.06);
}

.quote-upload-zone__icon {
  font-size: 2rem;
  color: var(--ezp-brand-blue);
}

.quote-upload-zone__text {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.3rem;
}

.quote-upload-zone__hint {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.25rem;
}

.quote-upload-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.quote-upload-preview img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.quote-upload-preview__name {
  font-size: 0.8rem;
  color: #333;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-upload-preview__remove {
  color: #dc3545;
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 767.98px) {
  .quote-footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .quote-footer__contact {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
  }
}
