/* ============================================================
   Floating Sidebar — Quick Enquiry Form + WhatsApp Button
   页面右下角固定浮动组件
   ============================================================ */

/* ── Container ── */
.kl-float {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 9999;
  font-family: var(--sans, 'Jost', sans-serif);
}

/* ── Trigger Buttons ── */
.kl-float__triggers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.kl-float__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  text-decoration: none;
  outline: none;
}

.kl-float__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.22);
}

/* 表单按钮：金色圆形，hover 展开文字 */
.kl-float__btn--form {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  gap: 0;
  background: #B8954A;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  transition: width 0.3s ease, border-radius 0.3s ease, padding 0.3s ease, gap 0.3s ease, background 0.25s;
}

.kl-float__btn--form:hover {
  width: auto;
  min-width: 48px;
  padding: 0 18px 0 14px;
  border-radius: 24px;
  gap: 7px;
  background: #A68440;
}

.kl-float__btn--form .kl-float__btn-label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.3s ease, opacity 0.25s ease;
  font-family: var(--sans, 'Jost', sans-serif);
}

.kl-float__btn--form:hover .kl-float__btn-label {
  max-width: 80px;
  opacity: 1;
}

.kl-float__btn--form.kl-float__btn--active {
  background: #1C1912;
  color: #B8954A;
}

/* WhatsApp 按钮：绿色圆形 */
.kl-float__btn--wa {
  width: 48px;
  height: 48px;
  background: #25D366;
  color: #fff;
}

.kl-float__btn--wa:hover {
  background: #1EBE57;
}

/* ── Panel ── */
.kl-float__panel {
  position: absolute;
  bottom: 116px;
  right: 0;
  width: 360px;
  max-height: min(680px, calc(100vh - 236px));
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  pointer-events: none;
}

.kl-float__panel.kl-float__panel--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.kl-float__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(28, 25, 18, 0.08);
}

.kl-float__panel-title {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink, #1C1912);
}

.kl-float__panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ink-ghost, #6B6250);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.kl-float__panel-close:hover {
  background: rgba(28, 25, 18, 0.06);
  color: var(--ink, #1C1912);
}

.kl-float__panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  overscroll-behavior: contain;
}

.kl-float__panel-foot {
  padding: 10px 16px;
  border-top: 1px solid rgba(28, 25, 18, 0.08);
}

.kl-float__wa-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #25D366;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.kl-float__wa-link:hover {
  color: #1EBE57;
}

/* Compact form layout inside the floating panel */
.kl-float__panel-body .kl-cf__row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.kl-float__panel-body .kl-cf__group {
  margin-bottom: 10px;
}

.kl-float__panel-body .kl-cf__label {
  font-size: 10px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.kl-float__panel-body .kl-cf__input,
.kl-float__panel-body .kl-cf__select,
.kl-float__panel-body .kl-cf__textarea {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
}

.kl-float__panel-body .kl-cf__textarea {
  height: 58px;
  min-height: 58px;
}

.kl-float__panel-body .kl-cf__submit {
  padding: 11px 18px;
  font-size: 10px;
  margin-top: 0;
}

.kl-float__panel-body .kl-cf__note {
  display: none;
}

.kl-float__panel-body .fluentform .ff-el-group {
  margin-bottom: 10px !important;
}

.kl-float__panel-body .fluentform label,
.kl-float__panel-body .fluentform .ff-el-group label.ff-el-form-label {
  font-size: 10px !important;
  line-height: 1.2 !important;
  margin-bottom: 4px !important;
}

.kl-float__panel-body .fluentform input,
.kl-float__panel-body .fluentform textarea,
.kl-float__panel-body .fluentform select {
  min-height: 40px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
}

.kl-float__panel-body .fluentform textarea {
  height: 58px !important;
  min-height: 58px !important;
}

.kl-float__panel-body .fluentform button.ff-btn.ff-btn-submit,
.kl-float__panel-body form[class*="fluent_form_"] .ff-btn-submit {
  padding: 11px 18px !important;
  font-size: 10px !important;
}

/* ── Overlay (mobile) ── */
.kl-float__overlay {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .kl-float {
    bottom: 16px;
    right: 16px;
  }

  .kl-float__panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateY(100%);
  }

  .kl-float__panel-body {
    padding: 14px 16px 18px;
  }

  .kl-float__panel-body .kl-cf__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .kl-float__panel.kl-float__panel--open {
    transform: translateY(0);
  }

  .kl-float__overlay.kl-float__overlay--open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
  }
}
