.consultation-widget {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1000;
  font-family: "Vazirmatn", sans-serif;
  direction: rtl;
}

.consultation-launcher {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 17px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #087eb0, #1755a6);
  box-shadow: 0 12px 30px rgba(7, 72, 119, .28);
  font: 700 14px/1.5 inherit;
  cursor: pointer;
}

.consultation-launcher__icon { font-size: 19px; }

.consultation-dialog {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 110px));
  overflow-y: auto;
  border: 1px solid rgba(15, 99, 151, .14);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 39, 70, .24);
}

.consultation-dialog[hidden] { display: none; }

.consultation-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  color: #fff;
  background: linear-gradient(135deg, #0c83b3, #174f9f);
}

.consultation-dialog__header span { font-size: 12px; opacity: .82; }
.consultation-dialog__header h2 { margin: 4px 0 0; color: inherit; font-size: 21px; }
.consultation-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  font: 400 25px/1 inherit;
  cursor: pointer;
}

.consultation-form { display: grid; gap: 13px; padding: 20px; }
.consultation-form label { display: grid; gap: 6px; color: #15324a; font-size: 13px; font-weight: 700; }
.consultation-form label small { color: #718397; font-size: 11px; font-weight: 500; }
.consultation-form input,
.consultation-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d7e2ec;
  border-radius: 12px;
  color: #102b42;
  background: #fbfdff;
  font: 500 14px/1.8 inherit;
  box-sizing: border-box;
  outline: none;
}
.consultation-form textarea { min-height: 112px; resize: vertical; }
.consultation-form input:focus,
.consultation-form textarea:focus { border-color: #1683b7; box-shadow: 0 0 0 3px rgba(22, 131, 183, .11); }
.consultation-form__hint { margin: -6px 0 0; color: #718397; font-size: 11px; }
.consultation-submit {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #116eae;
  font: 700 14px/1.5 inherit;
  cursor: pointer;
}
.consultation-submit:disabled { cursor: wait; opacity: .65; }
.consultation-feedback { min-height: 20px; color: #b4233f; font-size: 12px; }
.consultation-feedback.success { color: #087a55; }
.consultation-trap {
  position: absolute;
  right: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 560px) {
  .consultation-widget { right: 14px; bottom: 14px; }
  .consultation-launcher { min-height: 48px; padding: 9px 14px; }
  .consultation-dialog { position: fixed; right: 14px; bottom: 74px; width: calc(100vw - 28px); max-height: calc(100vh - 94px); }
}

@media (prefers-reduced-motion: no-preference) {
  .consultation-launcher { transition: transform .18s ease, box-shadow .18s ease; }
  .consultation-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(7, 72, 119, .34); }
}
