@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.css */

/*************************************************
 * V43_Enterprise_Production Estimate.css
 * Quote Estimator / Address / Price Result
 *************************************************/

/* ===================================
   Design Tokens
=================================== */

:root {
  --estimate-bg-primary: #050505;
  --estimate-bg-secondary: #111827;
  --estimate-field-bg: #0f172a;

  --estimate-gold: #d8b56d;
  --estimate-gold-light: #fff0b8;
  --estimate-gold-title: #fff3c2;
  --estimate-gold-muted: #d9c9a5;

  --estimate-text: #ffffff;
  --estimate-text-muted: #cfc3a8;

  --estimate-success: #9fe6b2;
  --estimate-danger: #ff9b9b;
  --estimate-warning: #ffd58a;

  --estimate-border: rgba(216, 181, 109, 0.2);

  --estimate-border-strong: rgba(216, 181, 109, 0.34);

  --estimate-radius-sm: 14px;
  --estimate-radius-md: 18px;
  --estimate-radius-lg: 28px;
  --estimate-radius-xl: 36px;

  --estimate-shadow-card: 0 24px 70px rgba(0, 0, 0, 0.38);

  --estimate-shadow-field:
    0 0 0 4px rgba(216, 181, 109, 0.08), 0 0 24px rgba(216, 181, 109, 0.18);

  --estimate-transition: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ===================================
   Estimate Section
=================================== */

.estimate-core-section {
  position: relative;
  isolation: isolate;

  padding: clamp(60px, 8vw, 100px) clamp(16px, 4vw, 32px);

  overflow: hidden;

  background: linear-gradient(
    180deg,
    var(--estimate-bg-primary) 0%,
    #090d14 44%,
    var(--estimate-bg-secondary) 100%
  );
}

.estimate-core-section::before {
  content: "";

  position: absolute;
  inset: 0;

  z-index: -2;

  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(216, 181, 109, 0.15),
      transparent 38%
    ),
    radial-gradient(
      circle at 8% 88%,
      rgba(216, 181, 109, 0.08),
      transparent 34%
    );

  pointer-events: none;
}

.estimate-core-section::after {
  content: "";

  position: absolute;
  inset: 0;

  z-index: -1;

  opacity: 0.2;

  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);

  background-size: 44px 44px;

  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 18%,
    #000 82%,
    transparent
  );

  pointer-events: none;
}

#estimate-core-container {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 1280px;

  margin-inline: auto;
}

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

.estimate-card {
  position: relative;

  width: 100%;
  max-width: 980px;

  margin-inline: auto;
  padding: clamp(22px, 4vw, 42px);

  overflow: hidden;

  border: 1px solid var(--estimate-border);

  border-radius: var(--estimate-radius-xl);

  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.065),
    rgba(255, 255, 255, 0.025)
  );

  -webkit-backdrop-filter: blur(20px);

  backdrop-filter: blur(20px);

  box-shadow: var(--estimate-shadow-card);
}

.estimate-card::before {
  content: "";

  position: absolute;
  inset: 0;

  border-radius: inherit;

  padding: 1px;

  background: linear-gradient(
    135deg,
    rgba(255, 240, 184, 0.34),
    transparent 38%,
    rgba(216, 181, 109, 0.12)
  );

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);

  -webkit-mask-composite: xor;
  mask-composite: exclude;

  pointer-events: none;
}

.estimate-card h2,
.estimate-card h3 {
  margin-top: 0;
  margin-bottom: 12px;

  color: var(--estimate-gold-title);

  line-height: 1.3;
  letter-spacing: 0.02em;
}

.estimate-card h2 {
  font-size: clamp(26px, 4vw, 42px);

  font-weight: 950;
}

.estimate-card h3 {
  font-size: clamp(20px, 3vw, 28px);

  font-weight: 900;
}

.estimate-card p {
  margin-top: 0;

  color: var(--estimate-text-muted);

  line-height: 1.8;
}

/* ===================================
   Quote Estimator Layout
=================================== */

.quote-estimator {
  display: grid;

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

  align-items: stretch;

  gap: 14px;

  width: 100%;
  margin-top: 24px;
}

.quote-estimator > * {
  min-width: 0;
}

/* ===================================
   Form Fields
=================================== */

.quote-estimator input,
.quote-estimator select,
.quote-estimator textarea {
  width: 100%;
  min-height: 52px;

  padding: 14px 16px;

  border: 1px solid rgba(216, 181, 109, 0.26);

  border-radius: var(--estimate-radius-sm);

  outline: none;

  appearance: none;
  -webkit-appearance: none;

  background-color: var(--estimate-field-bg);

  color: var(--estimate-text);

  font: inherit;
  font-size: 16px;
  font-weight: 700;

  line-height: 1.45;

  caret-color: var(--estimate-gold-light);

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

  transition:
    border-color var(--estimate-transition),
    box-shadow var(--estimate-transition),
    background-color var(--estimate-transition),
    transform var(--estimate-transition);
}

.quote-estimator input::placeholder,
.quote-estimator textarea::placeholder {
  color: rgba(255, 255, 255, 0.46);

  font-weight: 600;
}

.quote-estimator select {
  padding-right: 44px;

  cursor: pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, var(--estimate-gold-light) 50%),
    linear-gradient(135deg, var(--estimate-gold-light) 50%, transparent 50%);

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

  background-size:
    6px 6px,
    6px 6px;

  background-repeat: no-repeat;
}

.quote-estimator input:hover,
.quote-estimator select:hover,
.quote-estimator textarea:hover {
  border-color: var(--estimate-border-strong);

  background-color: #111b2d;
}

.quote-estimator input:focus,
.quote-estimator select:focus,
.quote-estimator textarea:focus {
  border-color: rgba(255, 240, 184, 0.88);

  box-shadow: var(--estimate-shadow-field);
}

.quote-estimator input:disabled,
.quote-estimator select:disabled,
.quote-estimator textarea:disabled {
  cursor: not-allowed;

  opacity: 0.55;

  background: rgba(15, 23, 42, 0.65);
}

.quote-estimator input[aria-invalid="true"],
.quote-estimator select[aria-invalid="true"],
.quote-estimator textarea[aria-invalid="true"],
.quote-estimator .is-invalid {
  border-color: rgba(255, 155, 155, 0.88);

  box-shadow: 0 0 0 4px rgba(255, 155, 155, 0.08);
}

.quote-estimator .is-valid {
  border-color: rgba(159, 230, 178, 0.75);

  box-shadow: 0 0 0 4px rgba(159, 230, 178, 0.06);
}

/* ===================================
   Google Maps Address Inputs
=================================== */

.pickupAddress,
.dropoffAddress,
.vehicleType,
#pickupAddress,
#dropoffAddress,
#vehicleType {
  width: 100%;
}

.pac-container {
  z-index: 999999 !important;

  margin-top: 8px;

  overflow: hidden;

  border: 1px solid rgba(216, 181, 109, 0.28);

  border-radius: 16px;

  background: #101827;

  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);

  font-family: inherit;
}

.pac-item {
  min-height: 48px;

  padding: 10px 14px;

  border-top: 1px solid rgba(255, 255, 255, 0.06);

  color: #e8e0cc;

  cursor: pointer;
}

.pac-item:first-child {
  border-top: none;
}

.pac-item:hover,
.pac-item-selected {
  background: rgba(216, 181, 109, 0.12);
}

.pac-item-query {
  color: var(--estimate-gold-light);

  font-size: 14px;
}

.pac-matched {
  color: #ffffff;

  font-weight: 900;
}

/* ===================================
   Quote Button
=================================== */

.quote-estimator button,
.quote-btn {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  min-height: 52px;

  padding: 14px 24px;

  border: 0;

  border-radius: var(--estimate-radius-sm);

  cursor: pointer;

  overflow: hidden;

  color: #15120c;

  background: linear-gradient(
    135deg,
    #fff6d5 0%,
    var(--estimate-gold-light) 36%,
    var(--estimate-gold) 100%
  );

  font: inherit;
  font-size: 15px;
  font-weight: 950;

  letter-spacing: 0.04em;
  white-space: nowrap;

  box-shadow:
    0 12px 28px rgba(216, 181, 109, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);

  transition:
    transform var(--estimate-transition),
    box-shadow var(--estimate-transition),
    filter var(--estimate-transition),
    opacity var(--estimate-transition);
}

.quote-estimator button::before,
.quote-btn::before {
  content: "";

  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;

  width: 42%;

  transform: skewX(-22deg);

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.58),
    transparent
  );

  transition: left 0.55s ease;
}

.quote-estimator button:hover,
.quote-btn:hover {
  transform: translateY(-3px);

  filter: brightness(1.04);

  box-shadow:
    0 16px 36px rgba(216, 181, 109, 0.32),
    0 0 26px rgba(216, 181, 109, 0.22);
}

.quote-estimator button:hover::before,
.quote-btn:hover::before {
  left: 125%;
}

.quote-estimator button:active,
.quote-btn:active {
  transform: translateY(-1px) scale(0.985);
}

.quote-estimator button:focus-visible,
.quote-btn:focus-visible {
  outline: 3px solid rgba(255, 240, 184, 0.38);

  outline-offset: 3px;
}

.quote-estimator button:disabled,
.quote-btn:disabled {
  cursor: not-allowed;

  opacity: 0.58;

  transform: none;

  filter: grayscale(0.18);

  box-shadow: none;
}

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

.quote-loading {
  position: relative;

  opacity: 0.78;

  pointer-events: none;
}

.quote-loading::after {
  content: "正在精算車資，請稍候…";

  display: block;

  grid-column: 1 / -1;

  margin-top: 10px;

  color: var(--estimate-gold-light);

  font-size: 14px;
  font-weight: 800;

  line-height: 1.6;
}

.quote-estimator button.is-loading,
.quote-btn.is-loading {
  color: transparent !important;

  pointer-events: none;
}

.quote-estimator button.is-loading::before,
.quote-btn.is-loading::before {
  display: none;
}

.quote-estimator button.is-loading::after,
.quote-btn.is-loading::after {
  content: "";

  position: absolute;

  width: 20px;
  height: 20px;

  border: 3px solid rgba(17, 17, 17, 0.25);

  border-top-color: #111111;

  border-radius: 50%;

  animation: estimateButtonSpin 0.75s linear infinite;
}

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

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

#quoteResult,
.quote-result {
  position: relative;

  margin-top: 22px;
  padding: clamp(18px, 3vw, 26px);

  overflow: hidden;

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

  border-radius: var(--estimate-radius-md);

  background: linear-gradient(
    135deg,
    rgba(216, 181, 109, 0.115),
    rgba(216, 181, 109, 0.04)
  );

  color: var(--estimate-gold-light);

  font-weight: 800;
  line-height: 1.8;

  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);

  animation: estimateResultEnter 0.38s ease both;
}

#quoteResult:empty,
.quote-result:empty {
  display: none;
}

#quoteResult::before,
.quote-result::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 2px;

  background: linear-gradient(
    90deg,
    transparent,
    var(--estimate-gold-light),
    transparent
  );
}

@keyframes estimateResultEnter {
  from {
    opacity: 0;

    transform: translateY(8px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

/* ===================================
   Result States
=================================== */

#quoteResult.is-success,
.quote-result.is-success {
  border-color: rgba(159, 230, 178, 0.3);

  background: rgba(159, 230, 178, 0.075);

  color: #d9ffe4;
}

#quoteResult.is-error,
.quote-result.is-error {
  border-color: rgba(255, 155, 155, 0.32);

  background: rgba(255, 155, 155, 0.075);

  color: #ffd4d4;
}

#quoteResult.is-warning,
.quote-result.is-warning {
  border-color: rgba(255, 213, 138, 0.34);

  background: rgba(255, 213, 138, 0.075);

  color: #ffe8bb;
}

/* ===================================
   Price Highlight
=================================== */

.quote-price {
  display: block;

  margin-top: 8px;

  color: var(--estimate-gold-title);

  font-size: clamp(28px, 5vw, 42px);

  font-weight: 950;

  line-height: 1.2;
  letter-spacing: -0.02em;

  text-shadow: 0 0 24px rgba(216, 181, 109, 0.16);
}

.quote-distance,
.quote-duration {
  color: var(--estimate-gold-muted);

  font-size: 15px;
  font-weight: 750;
}

.quote-meta {
  display: flex;
  flex-wrap: wrap;

  gap: 8px 18px;

  margin-top: 12px;
}

.quote-note {
  margin-top: 12px;

  color: rgba(255, 255, 255, 0.66);

  font-size: 13px;
  font-weight: 650;

  line-height: 1.7;
}

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

.estimate-card label {
  display: block;

  margin-bottom: 7px;

  color: var(--estimate-gold-light);

  font-size: 14px;
  font-weight: 850;
}

.estimate-field-error {
  display: block;

  margin-top: 7px;

  color: var(--estimate-danger);

  font-size: 13px;
  font-weight: 750;

  line-height: 1.5;
}

.estimate-helper-text {
  display: block;

  margin-top: 7px;

  color: rgba(255, 255, 255, 0.56);

  font-size: 13px;
  font-weight: 600;

  line-height: 1.5;
}

/* ===================================
   Tablet
=================================== */

@media (max-width: 1100px) {
  .quote-estimator {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-estimator button,
  .quote-estimator .quote-btn {
    width: 100%;
  }
}

/* ===================================
   Mobile
=================================== */

@media (max-width: 768px) {
  .estimate-core-section {
    padding: 60px 16px;
  }

  .estimate-card {
    padding: 22px 18px;

    border-radius: 24px;
  }

  .quote-estimator {
    grid-template-columns: minmax(0, 1fr);

    gap: 12px;

    margin-top: 20px;
  }

  .quote-estimator input,
  .quote-estimator select,
  .quote-estimator textarea,
  .quote-estimator button,
  .quote-btn {
    min-height: 54px;
  }

  .quote-estimator button,
  .quote-btn {
    width: 100%;
  }

  #quoteResult,
  .quote-result {
    margin-top: 18px;
  }

  .quote-price {
    font-size: 30px;
  }

  .quote-meta {
    display: grid;

    gap: 5px;
  }
}

/* ===================================
   Small Mobile
=================================== */

@media (max-width: 420px) {
  .estimate-core-section {
    padding-inline: 12px;
  }

  .estimate-card {
    padding: 20px 15px;

    border-radius: 20px;
  }

  .estimate-card h2 {
    font-size: 26px;
  }

  .quote-estimator input,
  .quote-estimator select,
  .quote-estimator textarea {
    padding-inline: 14px;
  }

  .quote-price {
    font-size: 27px;
  }
}

/* ===================================
   Reduced Motion
=================================== */

@media (prefers-reduced-motion: reduce) {
  .quote-estimator input,
  .quote-estimator select,
  .quote-estimator textarea,
  .quote-estimator button,
  .quote-btn,
  #quoteResult,
  .quote-result {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .quote-estimator button::before,
  .quote-btn::before {
    display: none;
  }
}
