/* Contact page: feedback button and modal form */

.contact-actions {
  margin: 26px 0 0;
}

.contact-open,
.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #d9411e;
  color: #fff;
  border: 0;
  border-radius: .3em;
  padding: .7em 1.15em;
  font: 600 .9em 'Source Sans Pro', 'Roboto', sans-serif;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.contact-open:hover,
.contact-submit:hover {
  background-color: #ff5a09;
}

.contact-open:focus-visible,
.contact-submit:focus-visible {
  outline: 2px solid #f0b429;
  outline-offset: 2px;
}

.contact-submit:disabled {
  cursor: wait;
  opacity: .7;
}

.contact-dialog {
  width: min(92vw, 560px);
  max-height: min(90vh, 720px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: #eee;
  background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
}

.contact-dialog::backdrop {
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.contact-dialog-panel {
  position: relative;
  padding: 30px;
  text-align: left;
}

.contact-dialog h2 {
  margin: 0 38px 10px 0;
  color: #f0b429;
  font-size: 1.45em;
  line-height: 1.2;
  text-align: left;
}

.contact-dialog-lead {
  margin: 0 0 20px;
  color: #bbb;
  font-size: .9em;
  line-height: 1.45;
}

.contact-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #aaa;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  font-size: 1em;
  cursor: pointer;
}

.contact-dialog-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .35);
}

.contact-dialog-close:focus-visible {
  outline: 2px solid #f0b429;
  outline-offset: 2px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-form label {
  margin-top: 7px;
  color: #bbb;
  font-size: .82em;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  color: #eee;
  background: #111;
  border: 1px solid #444;
  border-radius: 6px;
  font: inherit;
  font-size: .92em;
  line-height: 1.35;
}

.contact-form textarea {
  min-height: 122px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #d9411e;
  outline-offset: 1px;
  border-color: #d9411e;
}

.turnstile-wrap {
  min-height: 65px;
  margin: 12px 0 2px;
}

.contact-form-status {
  min-height: 1.4em;
  margin: 0;
  font-size: .84em;
  line-height: 1.35;
}

.contact-form-status.success {
  color: #7ee787;
}

.contact-form-status.error {
  color: #ff8a80;
}

.contact-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.contact-submit {
  align-self: flex-start;
  margin-top: 2px;
}

.contact-back {
  padding: 10px 4px;
  color: #aaa;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: .84em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-back:hover {
  color: #fff;
}

.contact-back:focus-visible {
  outline: 2px solid #f0b429;
  outline-offset: 2px;
}

.contact-back:disabled {
  opacity: .5;
  cursor: wait;
}

.contact-code-sent {
  margin: 8px 0 4px;
  color: #dddddd;
  font-size: .9em;
  line-height: 1.45;
}

.contact-code-sent strong {
  color: #f0b429;
  word-break: break-word;
}

.contact-code-hint {
  margin: 0 0 6px;
  color: #999999;
  font-size: .8em;
  line-height: 1.45;
}

.contact-code-input {
  letter-spacing: .38em;
  text-align: center;
  font-size: 1.3em !important;
  font-weight: 700;
}

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

.contact-success h3 {
  margin: 0 0 8px;
  color: #f0b429;
  font-size: 1.3em;
}

.contact-success p {
  margin: 0 0 20px;
  color: #dddddd;
  font-size: .92em;
  line-height: 1.5;
}

.contact-form[hidden],
.contact-success[hidden],
.contact-dialog-intro[hidden],
.contact-form [data-contact-step][hidden] {
  display: none;
}

body.contact-dialog-open {
  overflow: hidden;
}

:root[data-theme="gradient"] .contact-open,
:root[data-theme="gradient"] .contact-submit {
  background-color: transparent;
  background-image: linear-gradient(135deg, #7c3aed, #db2777 58%, #f97316);
  box-shadow: 0 6px 18px rgba(219, 39, 119, .32);
}

:root[data-theme="gradient"] .contact-open:hover,
:root[data-theme="gradient"] .contact-submit:hover {
  background-image: linear-gradient(135deg, #8b5cf6, #ec4899 58%, #fb923c);
  filter: brightness(1.05);
}

:root[data-theme="gradient"] .contact-dialog {
  background: linear-gradient(160deg, #241b46, #1a102f 72%);
  border-color: rgba(255, 255, 255, .2);
}

@media (max-width: 600px) {
  .contact-dialog-panel {
    padding: 24px 18px;
  }

  .contact-open,
  .contact-submit {
    width: 100%;
  }
}
