/* ==========================================================================
   RURALTECH CONTACT FORM V1
   Shared contact dialog + service CTA.
   ========================================================================== */

.rt-contact-dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  margin: auto;
  padding: 0;
  overflow: auto;

  color: rgba(239, 247, 244, .96);
  background:
    linear-gradient(
      145deg,
      rgba(8, 43, 49, .985),
      rgba(5, 31, 38, .985)
    );

  border:
    1px solid
    rgba(178, 219, 210, .18);

  border-radius: 20px;

  box-shadow:
    0 28px 90px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255, 255, 255, .035);
}


.rt-contact-dialog::backdrop {
  background:
    rgba(2, 17, 22, .68);

  backdrop-filter:
    blur(8px);
}


.rt-contact-dialog__shell {
  position: relative;
  padding: 24px 36px 26px;
}


.rt-contact-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding-right: 42px;
  margin-bottom: 25px;
}


.rt-contact-dialog__brand,
.rt-contact-dialog__section {
  margin: 0;

  font-size: 10px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}


.rt-contact-dialog__brand {
  color: rgba(214, 235, 229, .72);
}


.rt-contact-dialog__section {
  color: rgba(224, 211, 166, .76);
}


.rt-contact-dialog__close {
  position: absolute;
  top: 18px;
  right: 18px;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  padding: 0;

  color: rgba(238, 246, 243, .76);
  background: transparent;

  border:
    1px solid
    rgba(206, 232, 226, .12);

  border-radius: 50%;

  font: inherit;
  font-size: 23px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;

  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}


.rt-contact-dialog__close:hover,
.rt-contact-dialog__close:focus-visible {
  color: rgba(255, 255, 255, .96);

  border-color:
    rgba(227, 218, 179, .28);

  background:
    rgba(255, 255, 255, .035);

  transform:
    rotate(3deg);
}


.rt-contact-dialog__title {
  margin:
    0 0 10px;

  max-width: 620px;

  font-size:
    clamp(28px, 4vw, 43px);

  line-height: 1.08;
  font-weight: 300;
  letter-spacing: -.025em;

  color: rgba(247, 249, 244, .98);
}


.rt-contact-dialog__lead {
  margin:
    0 0 22px;

  max-width: 610px;

  color: rgba(209, 226, 221, .72);

  font-size:
    clamp(14px, 1.7vw, 16px);

  line-height: 1.65;
}


.rt-contact-form {
  display: grid;
  gap: 16px;
}


.rt-contact-form__grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 16px;
}


.rt-contact-form__field {
  display: grid;
  gap: 8px;
}


.rt-contact-form__field--full {
  grid-column: 1 / -1;
}


.rt-contact-form__label {
  display: flex;
  justify-content: space-between;
  gap: 16px;

  color: rgba(224, 237, 233, .82);

  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}


.rt-contact-form__optional {
  color: rgba(194, 210, 205, .46);
  font-size: 9px;
  font-weight: 500;
}


.rt-contact-form input,
.rt-contact-form select,
.rt-contact-form textarea {
  width: 100%;
  box-sizing: border-box;

  color: rgba(244, 249, 247, .95);

  background:
    rgba(3, 26, 32, .56);

  border:
    1px solid
    rgba(187, 219, 211, .15);

  border-radius: 11px;

  outline: none;

  font: inherit;
  font-size: 14px;

  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}


.rt-contact-form input,
.rt-contact-form select {
  min-height: 45px;
  padding: 9px 13px;
}


.rt-contact-form textarea {
  min-height: 118px;
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.55;
}


.rt-contact-form input:focus,
.rt-contact-form select:focus,
.rt-contact-form textarea:focus {
  background:
    rgba(4, 31, 37, .76);

  border-color:
    rgba(210, 217, 175, .42);

  box-shadow:
    0 0 0 3px
    rgba(210, 217, 175, .055);
}


.rt-contact-form select {
  cursor: pointer;
}


.rt-contact-form option {
  color: #eaf2ef;
  background: #082d34;
}


.rt-contact-form__privacy {
  margin: -2px 0 0;

  color: rgba(191, 210, 204, .56);

  font-size: 11px;
  line-height: 1.55;
}


.rt-contact-form__status {
  min-height: 18px;
  margin: 0;

  color: rgba(231, 201, 172, .9);

  font-size: 12px;
  line-height: 1.45;
}


.rt-contact-form__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;

  padding-top: 5px;
}


.rt-contact-form__submit {
  min-height: 44px;

  padding:
    10px 18px 11px;

  color: rgba(247, 246, 235, .94);

  background:
    linear-gradient(
      135deg,
      rgba(234, 225, 190, .115),
      rgba(135, 203, 196, .075)
    );

  border:
    1px solid
    rgba(226, 216, 176, .27);

  border-radius: 11px;

  font: inherit;
  font-size: 13px;
  font-weight: 520;
  letter-spacing: .025em;

  cursor: pointer;

  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    opacity 150ms ease;
}


.rt-contact-form__submit:hover,
.rt-contact-form__submit:focus-visible {
  transform: translateY(-1px);

  border-color:
    rgba(232, 223, 183, .45);

  background:
    linear-gradient(
      135deg,
      rgba(234, 225, 190, .16),
      rgba(135, 203, 196, .10)
    );
}


.rt-contact-form__submit:disabled {
  opacity: .48;
  cursor: wait;
  transform: none;
}


.rt-contact-form__honeypot {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  overflow: hidden !important;

  clip:
    rect(0 0 0 0) !important;

  clip-path:
    inset(50%) !important;

  white-space:
    nowrap !important;
}


.rt-contact-success {
  padding:
    22px 0 6px;
}


.rt-contact-success[hidden] {
  display: none;
}


.rt-contact-success__mark {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  margin-bottom: 20px;

  color: rgba(227, 222, 190, .95);

  border:
    1px solid
    rgba(225, 215, 175, .26);

  border-radius: 50%;

  font-size: 20px;
}


.rt-contact-success h3 {
  margin:
    0 0 10px;

  color: rgba(247, 249, 244, .97);

  font-size:
    clamp(24px, 3.5vw, 34px);

  font-weight: 300;
}


.rt-contact-success p {
  margin:
    0 0 25px;

  max-width: 510px;

  color: rgba(207, 225, 219, .70);

  line-height: 1.6;
}


.rt-contact-success__close {
  padding:
    9px 15px;

  color: rgba(239, 242, 231, .90);

  background: transparent;

  border:
    1px solid
    rgba(219, 211, 179, .23);

  border-radius: 10px;

  font: inherit;
  cursor: pointer;
}


/* --------------------------------------------------------------------------
   Subject routing row
   -------------------------------------------------------------------------- */

.rt-contact-form__routing {
  grid-column: 1 / -1;

  display: grid;

  grid-template-columns:
    minmax(235px, .84fr)
    minmax(0, 1.16fr);

  align-items: start;

  gap: 20px;
}


.rt-contact-form__routing
.rt-contact-form__field {
  min-width: 0;
}


/* --------------------------------------------------------------------------
   Contextual subject detail
   -------------------------------------------------------------------------- */

.rt-contact-form__details {
  min-width: 0;
  margin: 0;
  padding: 0;

  border: 0;
}


.rt-contact-form__details-title {
  width: 100%;

  display: flex;
  align-items: baseline;
  justify-content: space-between;

  gap: 12px;

  margin: 0;
  padding: 0;

  color:
    rgba(224, 237, 233, .82);

  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}


.rt-contact-form__details-label {
  min-width: 0;
}


.rt-contact-form__details-hint {
  flex: 0 0 auto;

  margin: 0;

  color:
    rgba(191, 210, 204, .48);

  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .025em;
  text-transform: none;

  white-space: nowrap;
}


.rt-contact-form__details-options {
  display: flex;
  flex-wrap: wrap;

  gap: 6px;

  margin-top: 8px;
}


.rt-contact-detail-chip {
  position: relative;

  display: inline-flex;
}


.rt-contact-detail-chip input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;
  pointer-events: none;
}


.rt-contact-detail-chip span {
  display: inline-flex;
  align-items: center;

  min-height: 28px;

  max-width: 100%;

  padding:
    5px 8px;

  white-space: nowrap;

  color:
    rgba(207, 222, 217, .62);

  background:
    rgba(3, 27, 33, .36);

  border:
    1px solid
    rgba(178, 210, 202, .105);

  border-radius: 7px;

  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;

  cursor: pointer;

  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}


.rt-contact-detail-chip:hover span {
  color:
    rgba(237, 241, 229, .88);

  background:
    linear-gradient(
      135deg,
      rgba(225, 214, 175, .075),
      rgba(105, 194, 187, .06)
    );

  border-color:
    rgba(218, 210, 177, .25);

  transform:
    translateY(-1px);
}


.rt-contact-detail-chip input:checked + span {
  color:
    rgba(250, 249, 238, .99);

  background:
    linear-gradient(
      135deg,
      rgba(225, 207, 148, .245),
      rgba(88, 196, 188, .18)
    );

  border-color:
    rgba(231, 219, 172, .62);

  box-shadow:
    0 0 0 1px
    rgba(227, 216, 174, .055),
    0 4px 13px
    rgba(0, 0, 0, .10),
    inset 0 1px 0
    rgba(255, 255, 255, .065);

  font-weight: 610;
}


.rt-contact-detail-chip
input:checked + span::before {
  content: "✓";

  display: inline-block;

  margin-right: 6px;

  color:
    rgba(243, 227, 169, .98);

  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}


.rt-contact-detail-chip input:focus-visible + span {
  outline:
    2px solid
    rgba(221, 216, 184, .44);

  outline-offset: 2px;
}


.rt-contact-detail-chip input:disabled + span {
  opacity: .38;
  cursor: default;
  transform: none;
}


/* --------------------------------------------------------------------------
   Service panel integration
   -------------------------------------------------------------------------- */

.rt-contact-service-cta-wrap {
  display: flex;
  justify-content: center;
  align-items: center;

  margin:
    25px 0 7px;
}


.rt-contact-service-cta {
  position: relative;

  display: inline-grid;
  grid-template-areas: "label";
  place-items: center;

  min-width: 220px;
  min-height: 34px;

  padding:
    6px 14px;

  color:
    rgba(232, 228, 208, .82);

  background:
    linear-gradient(
      135deg,
      rgba(229, 219, 181, .055),
      rgba(125, 203, 195, .035)
    );

  border:
    1px solid
    rgba(225, 215, 177, .16);

  border-radius: 8px;

  box-shadow:
    inset 0 1px 0
    rgba(255, 255, 255, .018);

  font: inherit;
  font-size: 12px;
  font-weight: 510;
  letter-spacing: .025em;
  line-height: 1.2;

  cursor: pointer;

  overflow: hidden;

  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}


.rt-contact-service-cta__label {
  grid-area: label;

  white-space: nowrap;

  transition:
    opacity 160ms ease,
    transform 180ms ease,
    color 180ms ease;
}


.rt-contact-service-cta__label--rest {
  opacity: 1;
  transform: translateY(0);
}


.rt-contact-service-cta__label--hover {
  opacity: 0;
  transform: translateY(6px);

  color:
    rgba(246, 244, 229, .96);
}


.rt-contact-service-cta:hover,
.rt-contact-service-cta:focus-visible {
  color:
    rgba(247, 244, 229, .96);

  background:
    linear-gradient(
      135deg,
      rgba(231, 219, 177, .115),
      rgba(111, 202, 194, .085)
    );

  border-color:
    rgba(229, 218, 177, .34);

  box-shadow:
    0 5px 18px
    rgba(0, 0, 0, .10),
    inset 0 1px 0
    rgba(255, 255, 255, .035);

  transform:
    translateY(-1px);
}


.rt-contact-service-cta:hover
.rt-contact-service-cta__label--rest,
.rt-contact-service-cta:focus-visible
.rt-contact-service-cta__label--rest {
  opacity: 0;
  transform: translateY(-6px);
}


.rt-contact-service-cta:hover
.rt-contact-service-cta__label--hover,
.rt-contact-service-cta:focus-visible
.rt-contact-service-cta__label--hover {
  opacity: 1;
  transform: translateY(0);
}


@media (max-width: 700px) {
  .rt-contact-form__routing {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}


@media (max-width: 640px) {
  .rt-contact-dialog {
    width:
      min(94vw, 720px);

    max-height:
      calc(100vh - 18px);

    border-radius: 16px;
  }


  .rt-contact-dialog__shell {
    padding:
      24px 20px 24px;
  }


  .rt-contact-dialog__header {
    margin-bottom: 24px;
  }


  .rt-contact-form__grid {
    grid-template-columns: 1fr;
  }


  .rt-contact-form__field--full {
    grid-column: auto;
  }


  .rt-contact-form__actions {
    justify-content: stretch;
  }


  .rt-contact-form__submit {
    width: 100%;
  }
}


@media (prefers-reduced-motion: reduce) {
  .rt-contact-dialog *,
  .rt-contact-service-cta {
    transition: none !important;
    animation: none !important;
  }
}


/* ==========================================================================
   RURALTECH CONTACT FORM V1.1.4
   Natural contextual pills.
   ========================================================================== */

@media (max-width: 700px) {
  .rt-contact-detail-chip span {
    white-space: normal;
  }
}
