@charset "UTF-8";

/*
===============================================================================
玹翔旅遊｜V43 Enterprise Production
正式商業版 CSS｜Luxury Black Gold Design System

SYSTEM_VERSION：V43_Enterprise_Production
SYSTEM_OWNER：玹翔旅遊 Xuan Xiang Travel
ENVIRONMENT：Production
===============================================================================
*/
/* FILE：estimate-core.css */

/* ======================================================
   玹翔旅遊 V43_Enterprise_Production
   Estimate Section｜即時估價區塊
====================================================== */

.estimate-section {
  position: relative;
  padding: 96px 0;
  overflow: hidden;
  isolation: isolate;
}

/* 背景光暈 */
.estimate-section::before,
.estimate-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.35;
}

.estimate-section::before {
  width: 360px;
  height: 360px;
  top: -140px;
  left: -120px;
  background: rgba(216, 181, 109, 0.22);
}

.estimate-section::after {
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -180px;
  background: rgba(30, 64, 175, 0.2);
}

/* ======================================================
   Estimate Card
====================================================== */

.estimate-card {
  position: relative;
  width: min(100% - 32px, 1040px);
  margin-inline: auto;
  padding: 46px;
  overflow: hidden;

  border-radius: 34px;
  border: 1px solid rgba(216, 181, 109, 0.22);

  background: linear-gradient(
    145deg,
    rgba(17, 24, 39, 0.98),
    rgba(7, 11, 20, 0.98)
  );

  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* 金色上緣質感 */
.estimate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  width: 84%;
  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(247, 223, 155, 0.85),
    transparent
  );
}

/* 卡片內柔光 */
.estimate-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -120px;
  top: -140px;

  border-radius: 50%;
  background: rgba(216, 181, 109, 0.08);
  filter: blur(60px);
  pointer-events: none;
}

/* ======================================================
   Heading
====================================================== */

.estimate-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 30px;
}

.estimate-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  margin-bottom: 14px;
  padding: 9px 15px;

  border-radius: 999px;
  border: 1px solid rgba(216, 181, 109, 0.3);
  background: rgba(216, 181, 109, 0.08);

  color: #f7df9b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.estimate-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.estimate-heading p {
  max-width: 680px;
  margin: 14px 0 0;

  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.85;
}

/* ======================================================
   Estimate Form
====================================================== */

.estimate-form {
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(180px, 220px)
    minmax(140px, auto);

  gap: 14px;
  align-items: stretch;
}

.estimate-field {
  position: relative;
  min-width: 0;
}

.estimate-field label {
  display: block;
  margin-bottom: 8px;

  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.estimate-form input,
.estimate-form select,
.estimate-form textarea {
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;

  border-radius: 17px;
  border: 1px solid rgba(216, 181, 109, 0.22);

  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.96),
    rgba(9, 14, 27, 0.96)
  );

  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;

  outline: none;
  appearance: none;
  -webkit-appearance: none;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 8px 24px rgba(0, 0, 0, 0.12);

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease,
    background-color 0.25s ease;
}

.estimate-form input::placeholder,
.estimate-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.estimate-form input:hover,
.estimate-form select:hover,
.estimate-form textarea:hover {
  border-color: rgba(216, 181, 109, 0.4);
}

.estimate-form input:focus,
.estimate-form select:focus,
.estimate-form textarea:focus {
  border-color: rgba(247, 223, 155, 0.78);

  box-shadow:
    0 0 0 4px rgba(216, 181, 109, 0.1),
    0 14px 30px rgba(0, 0, 0, 0.18);

  transform: translateY(-1px);
}

/* Select 箭頭 */
.estimate-form select {
  cursor: pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, #d8b56d 50%),
    linear-gradient(135deg, #d8b56d 50%, transparent 50%);

  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;

  background-size: 6px 6px;
  background-repeat: no-repeat;

  padding-right: 44px;
}

.estimate-form select option {
  background: #0f172a;
  color: #fff;
}

/* ======================================================
   Estimate Button
====================================================== */

.estimate-form button,
.estimate-submit {
  min-height: 56px;
  padding: 15px 24px;

  border: 0;
  border-radius: 17px;

  background: linear-gradient(135deg, #f5dda0, #d8b56d 55%, #b98b38);

  color: #17120a;
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.02em;

  cursor: pointer;

  box-shadow:
    0 14px 34px rgba(216, 181, 109, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease,
    opacity 0.25s ease;
}

.estimate-form button:hover,
.estimate-submit:hover {
  transform: translateY(-2px);

  box-shadow:
    0 19px 42px rgba(216, 181, 109, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);

  filter: brightness(1.04);
}

.estimate-form button:active,
.estimate-submit:active {
  transform: translateY(0) scale(0.985);
}

.estimate-form button:focus-visible,
.estimate-submit:focus-visible {
  outline: 3px solid rgba(247, 223, 155, 0.38);
  outline-offset: 3px;
}

.estimate-form button:disabled,
.estimate-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  filter: none;
}

/* ======================================================
   Quote Result
====================================================== */

#quoteResult {
  position: relative;
  z-index: 1;

  display: none;
  margin-top: 26px;
  padding: 22px 24px;

  border-radius: 20px;
  border: 1px solid rgba(216, 181, 109, 0.2);

  background: linear-gradient(
    135deg,
    rgba(216, 181, 109, 0.11),
    rgba(216, 181, 109, 0.045)
  );

  color: #fff0b8;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.7;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 15px 38px rgba(0, 0, 0, 0.16);

  animation: estimateResultIn 0.38s ease both;
}

#quoteResult:not(:empty) {
  display: block;
}

#quoteResult.is-success {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.08);
  color: #bbf7d0;
}

#quoteResult.is-warning {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

#quoteResult.is-error {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

.quote-result-title {
  display: block;
  margin-bottom: 6px;

  color: #fff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.quote-price {
  display: block;
  margin-top: 4px;

  color: #f7df9b;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

/* ======================================================
   Validation
====================================================== */

.estimate-form input.is-invalid,
.estimate-form select.is-invalid {
  border-color: rgba(248, 113, 113, 0.7);

  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.08);
}

.estimate-error {
  display: block;
  margin-top: 7px;

  color: #fca5a5;
  font-size: 12px;
  font-weight: 700;
}

/* ======================================================
   Loading State
====================================================== */

.estimate-form.is-loading {
  pointer-events: none;
}

.estimate-form.is-loading button,
.estimate-form.is-loading .estimate-submit {
  position: relative;
  color: transparent;
}

.estimate-form.is-loading button::after,
.estimate-form.is-loading .estimate-submit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;

  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;

  border: 3px solid rgba(23, 18, 10, 0.28);
  border-top-color: #17120a;
  border-radius: 50%;

  animation: estimateSpin 0.7s linear infinite;
}

/* ======================================================
   Animation
====================================================== */

@keyframes estimateResultIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes estimateSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ======================================================
   Responsive｜Tablet
====================================================== */

@media (max-width: 980px) {
  .estimate-section {
    padding: 78px 0;
  }

  .estimate-card {
    padding: 38px;
    border-radius: 30px;
  }

  .estimate-form {
    grid-template-columns: 1fr 1fr;
  }

  .estimate-form button,
  .estimate-submit {
    grid-column: 1 / -1;
  }
}

/* ======================================================
   Responsive｜Mobile
====================================================== */

@media (max-width: 680px) {
  .estimate-section {
    padding: 60px 0;
  }

  .estimate-card {
    width: min(100% - 24px, 1040px);
    padding: 28px 20px;
    border-radius: 25px;
  }

  .estimate-heading {
    margin-bottom: 24px;
  }

  .estimate-heading h2 {
    font-size: 30px;
  }

  .estimate-heading p {
    font-size: 14px;
    line-height: 1.75;
  }

  .estimate-form {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .estimate-form button,
  .estimate-submit {
    grid-column: auto;
    width: 100%;
  }

  .estimate-form input,
  .estimate-form select,
  .estimate-form textarea,
  .estimate-form button,
  .estimate-submit {
    min-height: 54px;
    border-radius: 15px;
  }

  #quoteResult {
    margin-top: 20px;
    padding: 19px;
    border-radius: 17px;
    font-size: 14px;
  }
}

/* ======================================================
   Accessibility
====================================================== */

@media (prefers-reduced-motion: reduce) {
  .estimate-form input,
  .estimate-form select,
  .estimate-form textarea,
  .estimate-form button,
  .estimate-submit,
  #quoteResult {
    transition: none;
    animation: none;
  }
}
