/**
* estimate_style.css
* Price Estimation Section — Averbest theme extension
* ใช้ร่วมกับ style.css ของ Averbest
*/

/*--------------------------------------------------------------
# Price Estimation Section
--------------------------------------------------------------*/
#price-estimation {
  background: #fffef8;
  padding: 60px 0 70px 0;
}

#price-estimation .section-header {
  text-align: center;
  margin-bottom: 36px;
}

#price-estimation .section-title {
  font-family: "Kanit", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #111;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 5px;
}

#price-estimation .section-description {
  font-size: 16px;
  color: #333;
  margin-bottom: 0;
}

/* ======= Product Card ======= */
.est-product-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.est-product-card {
  flex: 1 1 200px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}
.est-product-card img {
  width: 80%;
  display: block;
  margin: 12px auto 0 auto;
  object-fit: contain;
  border-radius: 6px;
}
.est-product-card-body {
  padding: 12px 14px 14px 14px;
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: center;
}
.est-product-card-body p {
  margin: 0;
}
.est-product-price {
  margin-top: 6px !important;
  font-weight: 300;
  color: #c0392b;
}
.est-product-card-button {
  display: inline-block;
  font-family: "Kanit", sans-serif;
  font-size: 12px;  
  font-weight: 300;
  color: #fff;
  background: #a6785e;
  border: 1px solid #B48200;
  border-radius: 6px;
  padding: 1px 8px;  
  vertical-align: middle;
  margin-left: 6px;
  margin-bottom: 6px;  
}
.est-product-card-button:hover {
  color: #fffeee;
}
@media (max-width: 576px) {
  .est-product-cards {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding-bottom: 8px;
  }
  .est-product-card {
    flex: 0 0 200px;
    min-width: 200px;
  }
}

/* ======= Form Close ======= */
.form-closed-notice {
  text-align: center;
  padding: 48px 24px;
  background: #fffbf0;
  border: 1.5px dashed #e6c96e;
  border-radius: 8px;
  margin: 24px auto;
  max-width: 860px;
}
.form-closed-notice i {
  font-size: 40px;
  color: #B48200;
  display: block;
  margin-bottom: 12px;
}
.form-closed-notice p {
  font-family: "Kanit", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #B48200;
  margin-bottom: 6px;
}
.form-closed-notice small {
  font-family: "Sarabun", serif;
  font-size: 15px;
  color: #999;
}

/* ======= Form Card ======= */
.est-form-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 32px 36px 28px 36px;
  max-width: 860px;
  margin: 0 auto 32px auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.est-row {
  display: flex;
  gap: 40px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.est-field-group {
  flex: 1;
  min-width: 220px;
}

.est-label {
  display: block;
  font-family: "Kanit", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #555;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

/* ======= Radio Buttons ======= */
.est-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.est-radio-group.est-radio-inline {
  flex-direction: row;
  gap: 24px;
}

.est-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-family: "Sarabun", serif;
  font-size: 16px;
  color: #333;
  line-height: 1.5;
}

.est-radio-label input[type="radio"] {
  accent-color: #B48200;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
}

.est-radio-label:hover {
  color: #B48200;
}

.est-note {
  display: block;
  font-size: 13px;
  color: #999;
  margin-left: 25px;
  margin-top: 1px;
}

/* ======= Badges ======= */
.est-badge {
  display: inline-block;
  font-size: 11px;
  font-family: "Kanit", sans-serif;
  font-weight: 250;
  letter-spacing: 0.3px;
  padding: 1px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 6px;
  margin-bottom: 6px;  
}

.est-badge-popular {
  background: #C89B82;
  color: #fff;
}

.est-badge-save {
  background: #C8B782;
  color: #fff;
}

/* ======= Text Input ======= */
.est-input {
  width: 100%;
  max-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-family: "Sarabun", serif;
  font-size: 16px;
  color: #333;
  background: #fafafa;
  transition: border-color 0.2s;
  outline: none;
}

.est-input:focus {
  border-color: #B48200;
  background: #fff;
}

/* ======= Submit Button ======= */
.est-btn-row {
  margin-top: 8px;
  text-align: center;
}

.est-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #a6785e;
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 12px 40px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(180,130,0,0.25);
}

.est-btn:hover {
  background: #9a6f00;
  box-shadow: 0 4px 14px rgba(180,130,0,0.35);
}

.est-btn i {
  font-size: 18px;
  line-height: 0;
}

/* ======= Result Card ======= */
.est-result-card {
  background: #fff;
  border: 1.5px solid #B48200;
  border-radius: 8px;
  padding: 32px 36px 28px 36px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 4px 18px rgba(180,130,0,0.12);
}

.est-result-section {
  margin-bottom: 20px;
}

.est-result-title {
  font-family: "Kanit", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #B48200;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f0e8cc;
  padding-bottom: 10px;
}

.est-result-title i {
  font-size: 18px;
}

.est-result-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 15px;
}

.est-result-label {
  font-family: "Kanit", sans-serif;
  font-size: 14px;
  color: #888;
  width: 155px;
  min-width: 155px;
  max-width: 155px;
  flex-shrink: 0;
}

.est-result-value {
  color: #333;
  font-family: "Sarabun", serif;
}

.est-price-row {
  margin-top: 4px;
  border-bottom: 2px solid #e6e6e6;
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.est-result-price {
  font-family: "Kanit", sans-serif;
  font-size: 26px;
  font-weight: 500;
  color: #B48200;
  letter-spacing: 0.5px;
}

.est-surcharge-row {
  background: #fffbf0;
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 6px;
}

/* ======= Warning Box ======= */
.est-warning-box {
  background: #fff8f0;
  border: 1px solid #f0c060;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-family: "Sarabun", serif;
  font-size: 15px;
  color: #7a5200;
}

.est-warning-box i {
  color: #c88000;
  margin-right: 6px;
}

/* ======= Delivery Box ======= */
.est-delivery-box {
  background: #f7f9f7;
  border-left: 3px solid #a6785e;
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin-top: 16px;
  font-family: "Sarabun", serif;
  font-size: 15px;
  color: #444;
}

.est-delivery-box p {
  margin: 0;
}

.est-delivery-box i {
  color: #a6785e;
  margin-right: 6px;
}

/* ======= CTA Row ======= */
.est-result-cta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f0e8cc;
  text-align: center;
}

.est-note-sm {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
  line-height: 1.7;
}

.est-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #B48200;
  color: #fff !important;
  font-family: "Kanit", sans-serif;
  font-size: 15px;
  font-weight: 300;
  padding: 10px 28px;
  border-radius: 6px;
  margin: 4px 6px;
  text-decoration: none;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(180,130,0,0.2);
  border: 1px solid #B48200;
}

.est-cta-btn:hover {
  background: #9a6f00;
  color: #fff !important;
}

.est-cta-btn-secondary {
  background: #a6785e;
  box-shadow: 0 2px 8px rgba(166,120,94,0.2);
}

.est-cta-btn-secondary:hover {
  background: #8a5e45;
}

/* ======= Full-width field group ======= */
.est-field-full {
  flex: 1 1 100%;
  width: 100%;
}

/* ======= Wrap inline radio (for many options) ======= */
.est-radio-inline.est-radio-wrap {
  flex-wrap: wrap;
  gap: 10px 24px;
}

/* ======= Result divider line ======= */
.est-result-divider {
  border-top: 1.5px solid #e6d9b0;
  margin: 6px 0;
}

/* ======= Final price highlight ======= */
.est-final-price-row {
  background: #fffbf0;
  border-radius: 4px;
  padding: 4px 8px;
}

.est-final-price {
  font-size: 30px !important;
  color: #9a6f00 !important;
}


.text-success {
  color: #2e7d32 !important;
}

.text-warning {
  color: #c88000 !important;
}

/* ======= Responsive ======= */
@media (max-width: 768px) {
  .est-form-card,
  .est-result-card {
    padding: 22px 18px 20px 18px;
  }

  .est-row {
    flex-direction: column;
    gap: 20px;
  }

  .est-result-row {
    grid-template-columns: 110px 1fr;
  }

  .est-result-price {
    font-size: 22px;
  }

  .est-input {
    max-width: 100%;
  }

  .est-radio-group.est-radio-inline {
    flex-direction: column;
    gap: 10px;
  }
}

/* ======= Messenger Modal ======= */
.est-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.est-modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px 28px 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  text-align: center;
}

.est-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.est-modal-close:hover { color: #555; }

.est-modal-icon {
  font-size: 40px;
  color: #0084ff;
  margin-bottom: 10px;
  line-height: 1;
}

.est-modal-title {
  font-family: "Kanit", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #222;
  margin-bottom: 8px;
}

.est-modal-desc {
  font-family: "Sarabun", serif;
  font-size: 15px;
  color: #555;
  margin-bottom: 14px;
  line-height: 1.65;
}

.est-modal-copied-note {
  background: #f0faf0;
  border: 1px solid #b2dfb2;
  border-radius: 6px;
  color: #2e7d32;
  font-size: 14px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-family: "Sarabun", serif;
}

.est-modal-copied-note i { margin-right: 5px; }

.est-modal-msg-box {
  background: #f8f6f0;
  border: 1px solid #e0d9c8;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: left;
  margin-bottom: 20px;
  max-height: 200px;
  overflow-y: auto;
}

.est-modal-msg-box pre {
  font-family: "Sarabun", serif;
  font-size: 14px;
  color: #333;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}

.est-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.est-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Kanit", sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.est-modal-btn-copy {
  background: #f0ece0;
  color: #555;
}

.est-modal-btn-copy:hover { background: #e0dbd0; }
.est-modal-btn-copy:disabled { opacity: 0.6; cursor: default; }

.est-modal-btn-primary {
  background: #0084ff;
  color: #fff;
}

.est-modal-btn-primary:hover { background: #006edc; }

@media (max-width: 480px) {
  .est-modal-box { padding: 24px 18px 20px 18px; }
  .est-modal-actions { flex-direction: column; }
  .est-modal-btn { width: 100%; justify-content: center; }
}

/* ======= Alert Modal ======= */
.est-alert-box {
  max-width: 360px;
  padding: 32px 28px 24px;
}

.est-alert-icon {
  font-size: 42px;
  color: #e6a817;
  margin-bottom: 14px;
}

.est-alert-text {
  font-family: "Sarabun", serif;
  font-size: 16px;
  color: #333;
  line-height: 1.75;
  margin-bottom: 20px;
}

.est-alert-ok-btn {
  background: #B48200;
  color: #fff;
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 11px;
}

.est-alert-ok-btn:hover {
  background: #9a6f00;
}