.rpip-root,
.rpip-root * {
  box-sizing: border-box;
}

.rpip-root[hidden],
.rpip-panel[hidden],
.rpip-launcher[hidden],
.rpip-product-summary[hidden] {
  display: none !important;
}

.rpip-root {
  position: fixed;
  right: 12px;
  bottom: 0;
  z-index: 1000000;
  width: min(330px, calc(100vw - 24px));
  color: #17252f;
  pointer-events: none;
}

.rpip-panel,
.rpip-launcher {
  pointer-events: auto;
}

.rpip-panel {
  width: 100%;
  max-height: none;
  overflow: visible;
  border: 1px solid #cfded6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(10, 28, 34, 0.22);
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.rpip-root.is-expanded .rpip-panel {
  transform: translateY(0);
  opacity: 1;
}

.rpip-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 6px 0 10px;
  border-radius: 7px 7px 0 0;
  background: #137a42;
  color: #fff;
}

.rpip-titlebar h2 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
}

.rpip-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rpip-window-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.rpip-window-button:hover,
.rpip-window-button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.rpip-intro {
  margin: 0;
  padding: 5px 10px;
  background: #fff7ea;
  color: #5b4a28;
  font-size: 11px;
  line-height: 1.25;
}

.rpip-product-summary {
  display: flex;
  gap: 5px;
  align-items: flex-start;
  margin: 5px 10px 0;
  padding: 4px 6px;
  border: 1px solid #d7e8df;
  border-radius: 8px;
  background: #f3faf6;
  color: #21313b;
  font-size: 11px;
  line-height: 1.2;
}

.rpip-product-summary span {
  flex: 0 0 auto;
  color: #65737d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.rpip-product-summary strong {
  flex: 1 1 auto;
  margin-top: 0;
  color: #0f5132;
  display: -webkit-box;
  max-height: 27px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.22;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rpip-product-summary button {
  display: none;
}

.rpip-product-summary button:hover,
.rpip-product-summary button:focus-visible {
  color: #9f5d12;
  text-decoration: underline;
  outline: none;
}

.rpip-form {
  max-height: none;
  overflow: visible;
  padding: 6px 10px 0;
}

.rpip-form .wpcf7 {
  margin: 0;
}

.rpip-form form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 5px;
  margin: 0;
}

.rpip-form p,
.rpip-form fieldset {
  margin: 0 !important;
  padding: 0 !important;
}

.rpip-form fieldset.hidden-fields-container {
  display: none !important;
}

.rpip-form .rpip-row-email,
.rpip-form .rpip-row-machine,
.rpip-form .rpip-row-message,
.rpip-form .rpip-row-submit,
.rpip-form .rpip-row-hidden,
.rpip-form .wpcf7-response-output,
.rpip-form .rpim-field {
  grid-column: 1 / -1;
}

.rpip-form .rpip-row-hidden,
.rpip-form .rpim-field {
  display: none !important;
}

.rpip-form label {
  display: grid;
  gap: 2px;
  margin: 0 !important;
  color: #243541;
  font-size: 12px;
  font-weight: 760;
}

.rpip-form label > br {
  display: none;
}

.rpip-form .rpip-hidden-optional,
.rpip-form .rpip-machine-hidden {
  display: none !important;
}

.rpip-form input[type="text"],
.rpip-form input[type="email"],
.rpip-form input[type="tel"],
.rpip-form input[type="url"],
.rpip-form textarea,
.rpip-form select {
  width: 100%;
  min-height: 32px;
  margin: 0;
  border: 1px solid #cfdde4;
  border-radius: 6px;
  background: #fff;
  color: #17252f;
  font-size: 13px;
  line-height: 1.35;
  padding: 5px 8px;
}

.rpip-form textarea {
  min-height: 64px;
  max-height: 76px;
  resize: vertical;
}

.rpip-form input:focus,
.rpip-form textarea:focus,
.rpip-form select:focus {
  border-color: #137a42;
  box-shadow: 0 0 0 3px rgba(19, 122, 66, 0.14);
  outline: none;
}

.rpip-form input[type="submit"],
.rpip-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px !important;
  min-height: 38px;
  padding: 0 12px !important;
  border: 1px solid #e3a036;
  border-radius: 7px;
  background: #e3a036;
  color: #101820;
  font-size: 13px;
  line-height: 1 !important;
  font-weight: 900;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.rpip-form input[type="submit"]:hover,
.rpip-form button[type="submit"]:hover,
.rpip-form input[type="submit"]:focus-visible,
.rpip-form button[type="submit"]:focus-visible {
  border-color: #cf8f25;
  background: #cf8f25;
  outline: 2px solid rgba(227, 160, 54, 0.25);
  outline-offset: 2px;
}

.rpip-root.is-sending .rpip-form input[type="submit"] {
  opacity: 0.72;
  cursor: wait;
}

.rpip-root.is-success .rpip-form form > :not(.wpcf7-response-output) {
  opacity: 0.48;
}

.rpip-form .wpcf7-not-valid-tip {
  margin-top: 2px;
  font-size: 11px;
}

.rpip-form .wpcf7-response-output {
  margin: 4px 0 0 !important;
  border-radius: 7px;
  padding: 5px 7px !important;
  font-size: 11px;
  line-height: 1.35;
}

.rpip-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 206px;
  min-height: 46px;
  margin-left: auto;
  border: 1px solid #137a42;
  border-radius: 999px;
  background: #137a42;
  color: #fff;
  box-shadow: 0 12px 30px rgba(10, 28, 34, 0.18);
  cursor: pointer;
}

.rpip-launcher span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px;
}

.rpip-launcher strong {
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.rpip-launcher:hover,
.rpip-launcher:focus-visible {
  background: #0f6938;
  outline: 2px solid rgba(19, 122, 66, 0.28);
  outline-offset: 3px;
}

@media (min-width: 641px) {
  body.rpip-actions-shifted .rp-contact-dock {
    top: auto !important;
    bottom: var(--rp-contact-actions-bottom, 154px) !important;
    transform: none !important;
    gap: 10px !important;
    z-index: 1000001 !important;
    transition: bottom 160ms ease;
  }

  body.rpip-actions-horizontal .rp-contact-dock {
    flex-direction: row !important;
    width: auto !important;
    height: auto !important;
    gap: 8px !important;
  }
}

@media (max-width: 900px) {
  .rpip-root {
    right: 12px;
    width: min(330px, calc(100vw - 24px));
  }
}

@media (max-width: 640px) {
  .rpip-root {
    right: 0;
    bottom: 0;
    width: 100%;
  }

  .rpip-panel {
    max-height: min(88vh, calc(100vh - 28px));
    overflow: hidden;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 15px 15px 0 0;
    transform: translateY(18px);
  }

  .rpip-titlebar {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 46px;
  }

  .rpip-form form {
    grid-template-columns: 1fr;
  }

  .rpip-form .rpip-row {
    grid-column: 1 / -1;
  }

  .rpip-form textarea {
    min-height: 72px;
    max-height: 90px;
  }

  .rpip-form {
    max-height: calc(88vh - 156px);
    overflow: auto;
    padding-right: 14px;
    padding-bottom: 2px;
  }

  .rpip-launcher {
    width: calc(100% - 36px);
    max-width: 320px;
    margin: 0 18px 18px auto;
  }

  .rpip-root.is-expanded ~ .rp-floating-cta,
  .rpip-open .rp-floating-cta,
  .rpip-open .e-contact-buttons,
  .rpip-open .rp-contact-rail,
  .rpip-open .rp-contact-dock {
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rpip-panel,
  .rpip-form input[type="submit"],
  .rpip-form button[type="submit"] {
    transition: none !important;
  }
}
