/* 使用獨特的命名空間前綴來避免衝突 */
.zp-pricing-wrapper * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.zp-pricing-wrapper {
  background-color: transparent;
  color: #333;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
}

.zp-pricing-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0;
}

.zp-scroll-hint {
  display: none;
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
  text-align: center;
}

.zp-pricing-table-frame {
  border: 2px solid #2156CD;
  border-radius: 10px;
  box-shadow: none !important;
  outline: 0 !important;
  overflow: hidden;
}

.zp-pricing-table-container {
  position: relative;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  outline: 0 !important;
}

.zp-pricing-layout {
  min-width: 1100px;
  background-color: #fff;
}

.zp-main-plan-heading {
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f1f3f5;
  color: #183252;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.zp-plan-grid {
  display: grid;
  grid-template-columns: 220px repeat(4, minmax(0, 1fr));
  min-width: 1100px;
  background-color: #fff;
}

.zp-plan-spacer,
.zp-plan-card {
  min-height: 160px;
  border-right: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  background-color: #fff;
}

.zp-plan-spacer {
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: #f7f9fb;
  color: #183252;
  font-weight: 700;
}

.zp-plan-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.zp-plan-card:last-child {
  border-right: 0;
}

.zp-plan-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.zp-plan-title {
  color: #183252;
  font-size: 16px;
  font-weight: 700;
}

.zp-plan-price {
  color: #4a6fa5;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.zp-price-note {
  margin-left: 4px;
  color: #222;
  font-size: 13px;
  font-weight: 400;
  vertical-align: middle;
}

.zp-plan-radio,
.zp-addon-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #4a6fa5;
  cursor: pointer;
}

.zp-plan-radio:disabled,
.zp-addon-checkbox:disabled {
  cursor: not-allowed;
}

.zp-diff-table-wrap {
  min-width: 1100px;
}

.zp-pricing-diff-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #fff;
  table-layout: fixed;
}

.zp-pricing-diff-table .zp-diff-item-col {
  width: 220px;
}

.zp-pricing-diff-table td {
  padding: 16px 18px;
  border-right: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  background-color: #fff;
  color: #183252;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
}

.zp-pricing-diff-table td:first-child {
  font-weight: 700;
  text-align: left;
}

.zp-pricing-diff-table td:last-child {
  border-right: 0;
}

.zp-pricing-diff-table tbody tr:last-child td {
  border-bottom: 0;
}

.zp-pricing-diff-table .zp-diff-group-row td {
  padding: 13px 18px;
  background-color: #f7f9fb;
  color: #416aa3;
  font-weight: 700;
  text-align: center;
}

.zp-pricing-diff-table tbody tr:not(.zp-diff-group-row) td:nth-child(n+2) {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.zp-pricing-layout[data-selected-plan="one-page"] .zp-plan-card[data-plan-key="one-page"],
.zp-pricing-layout[data-selected-plan="brand-site"] .zp-plan-card[data-plan-key="brand-site"],
.zp-pricing-layout[data-selected-plan="blog"] .zp-plan-card[data-plan-key="blog"],
.zp-pricing-layout[data-selected-plan="shop"] .zp-plan-card[data-plan-key="shop"],
.zp-pricing-layout[data-selected-plan="one-page"] .zp-pricing-diff-table tbody tr:not(.zp-diff-group-row) td:nth-child(2),
.zp-pricing-layout[data-selected-plan="brand-site"] .zp-pricing-diff-table tbody tr:not(.zp-diff-group-row) td:nth-child(3),
.zp-pricing-layout[data-selected-plan="blog"] .zp-pricing-diff-table tbody tr:not(.zp-diff-group-row) td:nth-child(4),
.zp-pricing-layout[data-selected-plan="shop"] .zp-pricing-diff-table tbody tr:not(.zp-diff-group-row) td:nth-child(5) {
  background-color: rgba(74, 111, 165, 0.05);
}

.zp-addon-table tr > :first-child,
.zp-detail-table tr > :first-child {
  border-left: 0 !important;
}

.zp-addon-table tr > :last-child,
.zp-detail-table tr > :last-child {
  border-right: 0 !important;
}

.zp-addon-table th,
.zp-addon-table td,
.zp-detail-table th,
.zp-detail-table td {
  border: 0 !important;
}

.zp-addon-table th:not(:last-child),
.zp-addon-table td:not(:last-child),
.zp-detail-table th:not(:last-child),
.zp-detail-table td:not(:last-child) {
  border-right: 1px solid #e9ecef !important;
}

.zp-addon-table th,
.zp-addon-table td,
.zp-detail-table th,
.zp-detail-table td {
  border-bottom: 1px solid #e9ecef !important;
}

.zp-addon-table tbody tr:last-child td,
.zp-detail-table tfoot tr:last-child td {
  border-bottom: 0 !important;
}

.zp-check-icon {
  color: #4CAF50;
  font-size: 18px;
}

.zp-cross-icon {
  color: #F44336;
  font-size: 18px;
}

.zp-shared-section {
  margin-top: 10px;
  overflow: hidden;
  border: 2px solid #2156CD;
  border-radius: 10px;
  background-color: #fff;
}

.zp-shared-heading {
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f1f3f5;
  color: #183252;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.zp-shared-content {
  padding: 22px;
}

.zp-shared-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.zp-shared-card {
  min-height: 120px;
  padding: 18px;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  background-color: #fff;
}

.zp-shared-card h3 {
  margin-bottom: 10px;
  color: #183252;
  font-size: 16px;
  font-weight: 700;
}

.zp-shared-card ul {
  display: grid;
  gap: 7px;
  list-style: none;
}

.zp-shared-card li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #344a62;
}

.zp-shared-card li span {
  color: #259a42;
  font-weight: 700;
}

.zp-shared-card li.is-limit span {
  color: #677a93;
}

.zp-addon-section,
.zp-total-section {
  margin-top: 10px;
  overflow: hidden;
  border-radius: 10px;
  background-color: #fff;
}

.zp-addon-section {
  border: 2px solid #2156CD !important;
}

.zp-total-section {
  border: 2px solid #2156CD !important;
}

.zp-addon-heading {
  padding: 15px 20px;
  background-color: #f1f3f5;
  color: #333;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.zp-addon-table,
.zp-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #fff;
  table-layout: fixed;
}

.zp-addon-table {
  border-color: transparent !important;
}

.zp-detail-table {
  border-color: transparent !important;
}

.zp-addon-table th,
.zp-addon-table td {
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  background-color: #fff;
}

.zp-addon-table th {
  color: #333;
  font-weight: 600;
  text-align: center;
}

.zp-addon-table th:first-child {
  width: 230px;
}

.zp-addon-table th:nth-child(3) {
  width: 110px;
}

.zp-addon-table th:last-child {
  width: 210px;
}

.zp-addon-table th:nth-child(3),
.zp-addon-table .zp-addon-qty-cell {
  display: none;
}

.zp-addon-table tbody tr:last-child td {
  border-bottom: 0;
}

.zp-addon-table .zp-addon-item-row td {
  vertical-align: middle;
}

.zp-addon-table .zp-addon-name-cell {
  background-color: transparent;
  font-weight: 600;
  line-height: 1.35;
}

.zp-addon-name-content {
  display: grid;
  grid-template-columns: 26px 22px minmax(0, 1fr);
  column-gap: 0;
  align-items: center;
  cursor: pointer;
}

.zp-addon-code {
  display: block;
  color: #4a6fa5;
  font-weight: 700;
  text-align: center;
}

.zp-addon-label {
  min-width: 0;
}

.zp-addon-table .zp-addon-desc-cell {
  text-align: left;
}

.zp-addon-table .zp-addon-qty-cell {
  text-align: center;
  vertical-align: middle;
}

.zp-addon-qty {
  display: block;
  width: 72px;
  height: 38px;
  margin: 0 auto;
  padding: 7px 0;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  color: #333;
  font-size: 15px;
  text-align: center;
  text-align-last: center;
}

.zp-addon-qty:disabled {
  color: #9aa3ad;
  cursor: not-allowed;
}

.zp-addon-table .zp-addon-price-cell {
  color: #4a6fa5;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.zp-addon-table .zp-addon-item-row.is-disabled .zp-addon-name-content,
.zp-addon-table .zp-addon-item-row.is-disabled .zp-addon-checkbox {
  cursor: not-allowed;
}

.zp-addon-table .zp-addon-item-row.is-disabled td,
.zp-addon-table .zp-addon-item-row.is-disabled .zp-addon-code,
.zp-addon-table .zp-addon-item-row.is-disabled .zp-addon-price-cell {
  color: #8a8f96;
}

.zp-detail-table th,
.zp-detail-table td {
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  background-color: #fff;
  color: #333;
  font-size: 16px;
  line-height: 1.35;
  vertical-align: middle;
}

.zp-detail-table th {
  font-weight: 700;
  text-align: center;
}

.zp-detail-table .zp-detail-title {
  padding: 15px 20px;
  background-color: #f1f3f5;
  font-size: 18px;
  letter-spacing: 0;
}

.zp-detail-no {
  width: 48px;
  text-align: center;
}

.zp-detail-qty,
.zp-detail-unit {
  text-align: center;
}

.zp-detail-qty {
  width: 120px;
}

.zp-detail-table td.zp-detail-qty {
  padding-right: 8px;
  padding-left: 8px;
  text-align: center;
}

.zp-detail-unit {
  width: 78px;
}

.zp-detail-price,
.zp-detail-amount {
  width: 150px;
  text-align: right;
  white-space: nowrap;
}

.zp-detail-qty-controls {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
}

.zp-detail-qty-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  background-color: #fff;
  color: #4a6fa5;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.zp-detail-qty-button:disabled {
  background-color: #f8f9fa;
  color: #b7c0ca;
  cursor: not-allowed;
}

.zp-detail-qty-value {
  min-width: 24px;
  color: #333;
  font-weight: 600;
  text-align: center;
}

.zp-detail-item {
  text-align: left;
}

.zp-detail-empty td {
  padding: 18px 12px;
  color: #666;
  text-align: center;
}

.zp-detail-table tfoot tr:last-child td {
  border-bottom: 0;
}

.zp-detail-table .zp-detail-summary-label {
  font-weight: 700;
  text-align: right;
}

.zp-detail-table .zp-detail-summary-value {
  color: #4a6fa5;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.zp-detail-table .zp-detail-grand-label,
.zp-detail-table .zp-detail-grand-value {
  font-size: 20px;
  font-weight: 700;
}

.zp-total-note {
  padding: 12px 20px 16px;
  border-top: 1px solid #e9ecef;
  color: #666;
  font-size: 14px;
}

.zp-quote-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 20px 20px;
  background-color: #fff;
}

.zp-quote-button,
.zpq-submit-button,
.zpq-line-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 20px;
  border: 0;
  border-radius: 6px;
  background-color: #4a6fa5;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.zpq-submit-button:disabled {
  background-color: #c7ced8;
  color: #f8f9fa;
  cursor: not-allowed;
}

.zpq-line-contact-button {
  background-color: #06c755;
}

.zpq-line-contact-button,
.zpq-line-contact-button:visited,
.zpq-line-contact-button:hover,
.zpq-line-contact-button:focus,
.zpq-line-contact-button:active {
  color: #fff;
}

.zpq-line-contact-button[hidden] {
  display: none !important;
}

.zpq-modal[hidden] {
  display: none !important;
}

.zpq-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.zpq-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
}

.zpq-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 10px;
  background-color: #fff;
}

.zpq-modal-panel h2 {
  padding: 18px 22px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f1f3f5;
  color: #333;
  font-size: 20px;
  text-align: center;
}

.zpq-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  color: #333;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.zpq-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.zpq-form label {
  display: grid;
  gap: 6px;
  color: #333;
  font-weight: 600;
}

.zpq-form input[type="text"],
.zpq-form input[type="tel"],
.zpq-form input[type="email"] {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  font-size: 15px;
}

.zpq-type-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 0;
  border: 0;
}

.zpq-type-group legend {
  flex-basis: 100%;
  margin-bottom: 2px;
  color: #333;
  font-weight: 700;
}

.zpq-type-group label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.zpq-company-fields {
  display: grid;
  gap: 14px;
}

.zpq-company-fields[hidden] {
  display: none !important;
}

.zpq-form-message {
  min-height: 22px;
  color: #666;
  font-size: 14px;
}

.zpq-form-message.is-error {
  color: #b42318;
}

.zpq-form-message.is-success {
  color: #2f7d32;
}

.zpq-form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.zpq-form-actions .zpq-submit-button,
.zpq-form-actions .zpq-line-contact-button {
  width: 170px;
}

@media (max-width: 768px) {
  .zp-scroll-hint {
    display: block;
  }

  .zp-shared-content {
    padding: 16px;
  }

  .zp-shared-grid {
    grid-template-columns: 1fr;
  }

  .zp-addon-table,
  .zp-addon-table thead,
  .zp-addon-table tbody,
  .zp-addon-table tr,
  .zp-addon-table th,
  .zp-addon-table td {
    display: block;
    width: 100%;
  }

  .zp-addon-table thead {
    display: none;
  }

  .zp-addon-table .zp-addon-item-row {
    border-bottom: 1px solid #e9ecef !important;
  }

  .zp-addon-table tbody tr:last-child {
    border-bottom: 0 !important;
  }

  .zp-addon-table .zp-addon-item-row td {
    border-right: 0 !important;
    border-bottom: 0 !important;
  }

  .zp-addon-table .zp-addon-name-cell {
    padding: 12px 16px;
  }

  .zp-addon-name-content {
    grid-template-columns: 28px 24px minmax(0, 1fr);
  }

  .zp-addon-table .zp-addon-desc-cell {
    padding: 12px 16px 6px;
  }

  .zp-addon-table .zp-addon-qty-cell {
    padding: 0 16px 8px;
    text-align: left;
  }

  .zp-addon-table .zp-addon-price-cell {
    padding: 0 16px 12px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .zp-addon-table .zp-addon-price-cell::before {
    content: "費用";
    display: inline-block;
    min-width: 44px;
    margin-right: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
  }

  .zp-detail-table th,
  .zp-detail-table td {
    padding: 7px 4px;
    font-size: 13px;
  }

  .zp-detail-table .zp-detail-title {
    font-size: 18px;
  }

  .zp-detail-no {
    width: 28px;
  }

  .zp-detail-qty,
  .zp-detail-unit {
    width: 32px;
  }

  .zp-detail-qty {
    width: 76px;
  }

  .zp-detail-price,
  .zp-detail-amount {
    width: 72px;
    white-space: normal;
  }

  .zp-detail-qty-controls {
    gap: 2px;
  }

  .zp-detail-qty-button {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: 14px;
  }

  .zp-detail-qty-value {
    min-width: 18px;
  }

  .zp-detail-table .zp-detail-grand-label,
  .zp-detail-table .zp-detail-grand-value {
    font-size: 16px;
  }

  .zp-quote-actions {
    justify-content: stretch;
  }

  .zp-quote-actions {
    padding: 0 16px 16px;
  }

  .zp-quote-button,
  .zpq-submit-button,
  .zpq-line-contact-button {
    width: 100%;
  }

  .zpq-modal {
    align-items: flex-start;
    padding: 12px;
  }
}
