/* Quick Contact — бейдж і панель швидкої форми.
   Токени ті самі, що в quick-links.css: жовтий #f3c400, текст #111. */

.quick-contact{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;              /* вище quick-links (9999) */
}

/* --- бейдж --- */
.quick-contact__toggle{
  display: flex;
  align-items: center;
  justify-content: center;

  width: 60px;
  height: 60px;
  padding: 0;

  border: 0;
  border-radius: 50%;
  background: #f3c400;
  color: #111;
  cursor: pointer;

  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  transition: background-color 140ms ease, transform 140ms ease;
}

.quick-contact__toggle:hover{ background: #ffd84a; }
.quick-contact__toggle:focus-visible{
  outline: 3px solid #111;
  outline-offset: 2px;
}
.quick-contact__toggle:active{ transform: scale(.96); }

.quick-contact__glyph{
  width: 32px;
  height: 32px;
  display: inline-flex;
}
.quick-contact__glyph svg{ width: 100%; height: 100%; fill: currentColor; }

/* --- панель --- */
.quick-contact__panel{
  position: absolute;
  right: 0;
  bottom: 76px;

  width: min(360px, calc(100vw - 40px));
  max-height: min(78vh, 620px);
  overflow-y: auto;

  padding: 22px 20px 18px;
  background: #fff;
  color: #111;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.24);

  /* анімація появи */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.quick-contact.is-open .quick-contact__panel{
  opacity: 1;
  transform: translateY(0);
}

/* [hidden] має перемагати display панелі */
.quick-contact__panel[hidden]{ display: none; }

.quick-contact__close{
  position: absolute;
  top: 10px;
  right: 10px;

  width: 32px;
  height: 32px;
  padding: 4px;

  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
  cursor: pointer;
}
.quick-contact__close:hover{ background: rgba(0,0,0,.06); color: #111; }
.quick-contact__close:focus-visible{ outline: 2px solid #111; outline-offset: 1px; }
.quick-contact__close svg{ width: 100%; height: 100%; fill: currentColor; }

.quick-contact__title{
  margin: 0 0 6px;
  padding-right: 28px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.quick-contact__text{
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #444;
}

/* --- поля форми --- */
.quick-contact .qc-field{ margin-bottom: 10px; }

.quick-contact .qc-field input,
.quick-contact .qc-field textarea{
  width: 100%;
  padding: 11px 13px;

  font: inherit;
  font-size: 15px;
  color: #111;

  background: #f5f5f5;
  border: 1px solid transparent;
  border-radius: 8px;
}

.quick-contact .qc-field textarea{ resize: vertical; min-height: 92px; }

.quick-contact .qc-field input::placeholder,
.quick-contact .qc-field textarea::placeholder{ color: #6a6a6a; }

.quick-contact .qc-field input:focus,
.quick-contact .qc-field textarea:focus{
  outline: none;
  border-color: #111;
  background: #fff;
}

.quick-contact .qc-consent{
  margin: 10px 0 14px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #444;
}
.quick-contact .qc-consent a{ color: #8a6d00; text-decoration: underline; }
.quick-contact .qc-consent .wpcf7-list-item{ margin: 0; }

.quick-contact .qc-submit input[type="submit"]{
  width: 100%;
  padding: 12px 16px;

  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #111;

  background: #f3c400;
  border: 0;
  border-radius: 8px;
  cursor: pointer;

  transition: background-color 140ms ease;
}
.quick-contact .qc-submit input[type="submit"]:hover{ background: #ffd84a; }
.quick-contact .qc-submit input[type="submit"]:focus-visible{ outline: 3px solid #111; outline-offset: 2px; }

/* повідомлення CF7 */
.quick-contact .wpcf7-response-output{
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 13.5px;
  border-radius: 8px;
}
.quick-contact .wpcf7-not-valid-tip{
  font-size: 12.5px;
  color: #b3261e;
  margin-top: 4px;
}

/* --- мобільний --- */
@media (max-width: 600px){
  .quick-contact{ right: 14px; bottom: 14px; }
  .quick-contact__panel{
    width: calc(100vw - 28px);
    max-height: 76vh;
  }
}

@media (prefers-reduced-motion: reduce){
  .quick-contact__toggle,
  .quick-contact__panel{ transition: none; }
}

/*
 * Кнопка «вгору» теми (#scroll_up) живе в тому самому кутку, що й наш бейдж,
 * і накладалася на нього.
 *
 * Арифметика (десктоп): кнопка 50x50, базово `top:100%`, тема зсуває її
 * `translate(-30px, -80px)` → вона займає 30..80px від низу екрана.
 * Наш бейдж — 60x60 на `bottom:20px` → займає 20..80px. Тобто кнопка теми
 * лежала цілком усередині бейджа.
 *
 * Піднімаємо її НАД бейджем і заразом вирівнюємо центри по горизонталі:
 *   translateY -160px → нижній край на 110px від низу = 30px просвіту над бейджем;
 *   translateX  -25px → центр на 50px від правого краю = центр бейджа.
 *
 * ⚠️ Специфічність: у теми таке саме `#scroll_up.active:empty`, тому додаємо
 * `body` — інакше все залежало б від порядку підключення файлів.
 */
body #scroll_up.active:empty{
  transform: translate(-25px, -160px);
}

@media (max-width: 600px){
  /* на мобільному бейдж зсунуто до 14px, його центр — 44px від краю,
     верхній край — 74px від низу */
  body #scroll_up.active:empty{
    transform: translate(-19px, -150px);
  }
}
