/* ════════════════════════════════════════════════
   Footer 聯絡表單 — contact-form.css
   正心衛浴翻新 PUREHEART
   ════════════════════════════════════════════════ */

/* ── 區塊容器 ── */
.footer-contact-section {
  background: linear-gradient(180deg, #0a1c38 0%, #0f2440 50%, #0b1e3d 100%);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 56px 0 52px;
  position: relative;
  overflow: hidden;
}

/* 背景裝飾紋 */
.footer-contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 10% 50%, rgba(42,157,143,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 90% 30%, rgba(26,61,110,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.footer-contact-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── 標題區 ── */
.footer-contact-header {
  text-align: center;
  margin-bottom: 36px;
}

.footer-contact-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(42,157,143,0.15);
  border: 1px solid rgba(42,157,143,0.25);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(42,157,143,0.9);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-contact-header__title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 10px;
}

.footer-contact-header__title em {
  font-style: normal;
  color: rgba(42,157,143,0.9);
}

.footer-contact-header__sub {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.75;
}

/* ── 表單卡片 ── */
.footer-contact-form-wrap {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 32px 32px 28px;
  backdrop-filter: blur(8px);
}

/* 表單 grid（2欄） */
.fcf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.fcf-col-full {
  grid-column: 1 / -1;
}

/* ── 欄位樣式 ── */
.fcf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fcf-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.03em;
}

.fcf-label .fcf-required {
  color: rgba(239,68,68,0.8);
  margin-left: 3px;
}

.fcf-input,
.fcf-select,
.fcf-textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 0.86rem;
  font-family: 'Noto Sans TC', sans-serif;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.fcf-input::placeholder,
.fcf-textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

.fcf-input:focus,
.fcf-select:focus,
.fcf-textarea:focus {
  border-color: rgba(42,157,143,0.7);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(42,157,143,0.12);
}

.fcf-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.fcf-select option {
  background: #0f2440;
  color: #fff;
}

.fcf-textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.65;
}

/* 聯絡方式說明 */
.fcf-contact-note {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.3);
  margin-top: 2px;
}

/* 必填說明文字 */
.fcf-required-note {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.3);
  text-align: right;
  margin-bottom: 4px;
  grid-column: 1 / -1;
}

/* ── 提交按鈕 ── */
.fcf-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.fcf-privacy-note {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.28);
  line-height: 1.6;
  flex: 1;
  min-width: 180px;
}

.fcf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: #2a9d8f;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(42,157,143,0.3);
}

.fcf-btn:hover {
  background: #1e7d72;
  box-shadow: 0 6px 20px rgba(42,157,143,0.4);
}

.fcf-btn:active { transform: scale(0.97); }

.fcf-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.fcf-btn .fcf-btn__spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fcfSpin 0.65s linear infinite;
}

.fcf-btn.loading .fcf-btn__spinner { display: block; }
.fcf-btn.loading .fcf-btn__text { display: none; }

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

/* ── 錯誤提示 ── */
.fcf-field-error {
  font-size: 0.72rem;
  color: #fc8181;
  margin-top: 2px;
  display: none;
}

.fcf-input.error,
.fcf-select.error,
.fcf-textarea.error {
  border-color: rgba(239,68,68,0.6);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}

/* ── 送出成功狀態 ── */
.fcf-success {
  display: none;
  text-align: center;
  padding: 40px 24px;
}

.fcf-success__icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(42,157,143,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: #2a9d8f;
  margin: 0 auto 18px;
  animation: fcfPopIn 0.4s ease;
}

@keyframes fcfPopIn {
  0% { transform: scale(0.7); opacity: 0; }
  80% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.fcf-success__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.fcf-success__sub {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin-bottom: 20px;
}

.fcf-success__reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.fcf-success__reset:hover { background: rgba(255,255,255,0.12); }

/* ── 全域錯誤訊息 ── */
.fcf-form-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #fc8181;
  margin-bottom: 16px;
  display: none;
  grid-column: 1 / -1;
}

/* ── RWD ── */
@media (max-width: 640px) {
  .footer-contact-section { padding: 40px 0 36px; }
  .footer-contact-form-wrap { padding: 22px 18px 20px; }
  .fcf-grid { grid-template-columns: 1fr; gap: 12px; }
  .fcf-col-full { grid-column: 1; }
  .fcf-submit-row { flex-direction: column; align-items: stretch; }
  .fcf-btn { justify-content: center; }
  .fcf-privacy-note { text-align: center; min-width: unset; }
  .footer-contact-header__title { font-size: 1.2rem; }
  .fcf-required-note { text-align: left; }
}
