/* ===== TALKME FORM THEME VARIABLES ===== */

#request.rp-request {
  padding: 70px 20px !important;
  font-family: Inter, Arial, sans-serif !important;

  --rp-request-bg: #0a0a0a;
  --rp-request-text: #ffffff;
  --rp-request-title: #ffffff;
  --rp-request-subtitle: rgba(255,255,255,.58);
  --rp-form-bg: rgba(255,255,255,.04);
  --rp-form-border: rgba(255,255,255,.10);
  --rp-label: rgba(255,255,255,.80);
  --rp-input-bg: rgba(255,255,255,.08);
  --rp-input-bg-focus: rgba(255,255,255,.11);
  --rp-input-border: rgba(255,255,255,.16);
  --rp-input-border-focus: rgba(194,65,12,.75);
  --rp-input-text: #ffffff;
  --rp-placeholder: rgba(255,255,255,.32);
  --rp-consent-text: rgba(255,255,255,.62);
  --rp-error: #f87171;
  --rp-required: #fca5a5;
}

#request.rp-request_dark {
  --rp-request-bg: #0a0a0a;
  --rp-request-text: #ffffff;
  --rp-request-title: #ffffff;
  --rp-request-subtitle: rgba(255,255,255,.58);
  --rp-form-bg: rgba(255,255,255,.04);
  --rp-form-border: rgba(255,255,255,.10);
  --rp-label: rgba(255,255,255,.80);
  --rp-input-bg: rgba(255,255,255,.08);
  --rp-input-bg-focus: rgba(255,255,255,.11);
  --rp-input-border: rgba(255,255,255,.16);
  --rp-input-border-focus: rgba(194,65,12,.75);
  --rp-input-text: #ffffff;
  --rp-placeholder: rgba(255,255,255,.32);
  --rp-consent-text: rgba(255,255,255,.62);
  --rp-error: #f87171;
  --rp-required: #fca5a5;
}

#request.rp-request_light {
  --rp-request-bg: #f5f3ee;
  --rp-request-text: #0a0a0a;
  --rp-request-title: #0a0a0a;
  --rp-request-subtitle: #78716c;
  --rp-form-bg: #ffffff;
  --rp-form-border: rgba(10,10,10,.12);
  --rp-label: #3d3935;
  --rp-input-bg: #ffffff;
  --rp-input-bg-focus: #ffffff;
  --rp-input-border: rgba(10,10,10,.14);
  --rp-input-border-focus: #c2410c;
  --rp-input-text: #0a0a0a;
  --rp-placeholder: #a8a29e;
  --rp-consent-text: #78716c;
  --rp-error: #dc2626;
  --rp-required: #c2410c;
}

#request.rp-request {
  background: var(--rp-request-bg) !important;
  color: var(--rp-request-text) !important;
}

#request.rp-request .rp-request__inner {
  width: min(100%, 920px) !important;
  margin: 0 auto !important;
}

#request.rp-request .rp-request__header {
  margin: 0 0 32px !important;
}

#request.rp-request_light .rp-request__header {
  text-align: center !important;
}

#request.rp-request .rp-request__title {
  margin: 0 0 14px !important;
  color: var(--rp-request-title) !important;
}

#request.rp-request .rp-request__subtitle {
  margin: 0 !important;
  color: var(--rp-request-subtitle) !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
}

#request.rp-request_dark .rp-request__subtitle {
  max-width: 700px !important;
}


/* ===== TALK-ME FORM CARD ===== */
#request.rp-request .rp-talk-form {
  width: 100% !important;
  max-width: 920px !important;
  margin: 0 auto !important;
  padding: 40px 42px 36px !important;
  background: var(--rp-form-bg) !important;
  border: 1px solid var(--rp-form-border) !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
}

#request.rp-request .rp-talk-form,
#request.rp-request .rp-talk-form * {
  box-sizing: border-box !important;
  font-family: Inter, Arial, sans-serif !important;
}

#request.rp-request .rp-talk-form .online-chat-root,
#request.rp-request .rp-talk-form .online-chat-inline-component,
#request.rp-request .rp-talk-form [class*="tab_"],
#request.rp-request .rp-talk-form .chat-form {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#request.rp-request .rp-talk-form .htmlify {
  display: none !important;
}

#request.rp-request .rp-talk-form .chat-form > span {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
}

#request.rp-request .rp-talk-form .chat-form > span > div {
  width: 100% !important;
  margin: 0 !important;
}

#request.rp-request .rp-talk-form .chat-form > span > div:nth-child(5),
#request.rp-request .rp-talk-form .chat-form > span > div:nth-child(6) {
  grid-column: 1 / -1 !important;
}

#request.rp-request .rp-talk-label {
  display: none !important;
}

#request.rp-request .rp-talk-form .chat-form-item,
#request.rp-request .rp-talk-form .relative,
#request.rp-request .rp-talk-form .input-container {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#request.rp-request .rp-talk-form .relative {
  position: relative !important;
}

#request.rp-request .rp-talk-form .svg-icon.icon {
  display: none !important;
}


/* ===== REQUIRED / ERRORS ===== */
#request.rp-request .rp-talk-form .relative > .required.text-red:empty {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  right: 12px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translateY(-50%) !important;
  color: var(--rp-required) !important;
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

#request.rp-request .rp-talk-form .relative > .required.text-red:empty::before {
  content: "*" !important;
}

#request.rp-request .rp-talk-form .relative > .required.text-red:not(:empty) {
  display: block !important;
  position: static !important;
  margin: 5px 0 0 !important;
  padding: 0 !important;
  transform: none !important;
  color: var(--rp-error) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}


/* ===== FIELDS ===== */
#request.rp-request .rp-talk-form input:not([type="checkbox"]) {
  display: block !important;
  width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 30px 0 14px !important;
  background: var(--rp-input-bg) !important;
  border: 1px solid var(--rp-input-border) !important;
  border-radius: 0 !important;
  color: var(--rp-input-text) !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
  outline: none !important;
  box-shadow: none !important;
}

#request.rp-request .rp-talk-form input:not([type="checkbox"])::placeholder,
#request.rp-request .rp-talk-comment-textarea::placeholder {
  color: var(--rp-placeholder) !important;
}

#request.rp-request .rp-talk-form input:not([type="checkbox"]):focus,
#request.rp-request .rp-talk-comment-textarea:focus {
  border-color: var(--rp-input-border-focus) !important;
  background: var(--rp-input-bg-focus) !important;
}

#request.rp-request .rp-talk-form .vue-phone-number-input {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 30px 0 14px !important;
  background: var(--rp-input-bg) !important;
  border: 1px solid var(--rp-input-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#request.rp-request .rp-talk-form .vue-phone-number-input input:not([type="checkbox"]) {
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 0 0 10px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#request.rp-request .rp-talk-form .field-country-flag {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#request.rp-request .rp-talk-form input[name="primechanie"] {
  display: none !important;
}

#request.rp-request .rp-talk-comment-textarea {
  display: block !important;
  width: 100% !important;
  height: 108px !important;
  min-height: 108px !important;
  margin: 0 !important;
  padding: 14px !important;
  background: var(--rp-input-bg) !important;
  border: 1px solid var(--rp-input-border) !important;
  border-radius: 0 !important;
  color: var(--rp-input-text) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  outline: none !important;
  resize: vertical !important;
  box-shadow: none !important;
}


/* ===== CONSENT ===== */
#request.rp-request .rp-talk-consent {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 16px 0 0 !important;
  padding: 0 !important;
}

#request.rp-request .rp-talk-consent input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  accent-color: #c2410c !important;
  cursor: pointer !important;
}

#request.rp-request .rp-talk-consent label {
  margin: 0 !important;
  color: var(--rp-consent-text) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  cursor: pointer !important;
}

#request.rp-request .rp-talk-consent a {
  color: #c2410c !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

#request.rp-request .rp-talk-consent-error {
  display: none !important;
  margin: 8px 0 0 !important;
  color: var(--rp-error) !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

#request.rp-request .rp-talk-consent-error.is-visible {
  display: block !important;
}


/* ===== BUTTON ===== */
#request.rp-request .rp-talk-form button,
#request.rp-request .rp-talk-form .button,
#request.rp-request .rp-talk-form .round.primary.button.full-width {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 52px !important;
  margin: 22px 0 0 !important;
  padding: 0 24px !important;
  background: #c2410c !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  letter-spacing: 0.01em !important;
}

#request.rp-request .rp-talk-form button:hover,
#request.rp-request .rp-talk-form .button:hover,
#request.rp-request .rp-talk-form .round.primary.button.full-width:hover {
  background: #9a3412 !important;
}

#request.rp-request .rp-talk-form button .text,
#request.rp-request .rp-talk-form .button .text {
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* ===== HEADER FIXES ===== */
.section__header--narrow-700 { max-width: 700px; }
.section__header--narrow-660 { max-width: 660px; }
.section__subtitle--center-narrow { max-width: 520px; margin: 0 auto; }
.mt-0 { margin-top: 0 !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  #request.rp-request {
    padding: 56px 16px !important;
  }

  #request.rp-request .rp-request__subtitle {
    font-size: 14px !important;
  }

  #request.rp-request .rp-talk-form {
    padding: 28px 20px 24px !important;
  }

  #request.rp-request .rp-talk-form .chat-form > span {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  #request.rp-request .rp-talk-form .chat-form > span > div,
  #request.rp-request .rp-talk-phone-field,
  #request.rp-request .rp-talk-comment-field {
    grid-column: 1 / -1 !important;
  }

  #request.rp-request .rp-talk-comment-textarea {
    height: 96px !important;
    min-height: 96px !important;
  }

  #request.rp-request .rp-talk-form button,
  #request.rp-request .rp-talk-form .button,
  #request.rp-request .rp-talk-form .round.primary.button.full-width {
    height: 54px !important;
  }
}
/* ===== FIX: показываем поле "Примечание" без JS-доработок ===== */

#request.rp-request .rp-talk-form input[name="primechanie"],
#request.rp-request .rp-talk-form input[name="comment"],
#request.rp-request .rp-talk-form input[name="comments"] {
  display: block !important;
}

/* 6-е поле формы — Примечание — на всю ширину */
#request.rp-request .rp-talk-form .chat-form > span > div:nth-child(6) {
  grid-column: 1 / -1 !important;
}

/* На всякий случай фиксируем телефон тоже на всю ширину */
#request.rp-request .rp-talk-form .chat-form > span > div:nth-child(5) {
  grid-column: 1 / -1 !important;
}