/* ═══════════════════════════════════════════════
   Email Modal
   ═══════════════════════════════════════════════ */

.th-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.th-modal.is-open { opacity: 1; pointer-events: auto; }

.th-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 5, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.th-modal-window {
  position: relative;
  width: min(540px, 100%);
  background: #0e1a10;
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 6px;
  max-height: 92vh;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}
.th-modal.is-open .th-modal-window { transform: scale(1) translateY(0); }

.th-modal-bar {
  background: #131f15;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
  flex-shrink: 0;
}
.th-modal-dots { display: flex; gap: 7px; flex-shrink: 0; }
.th-modal-dot { width: 12px; height: 12px; border-radius: 50%; border: none; cursor: pointer; padding: 0; flex-shrink: 0; }
.th-modal-dot--close { background: #ff5f57; }
.th-modal-dot--min   { background: #febc2e; cursor: default; }
.th-modal-dot--max   { background: #28c840; cursor: default; }
.th-modal-window-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  color: rgba(240, 234, 216, 0.38);
  flex: 1; text-align: center; padding-right: 38px;
}

.th-modal-field {
  display: flex; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.09);
  flex-shrink: 0;
}
.th-modal-field-lbl {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  color: rgba(240, 234, 216, 0.36);
  width: 68px; flex-shrink: 0;
}
.th-modal-to-val {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: rgba(240, 234, 216, 0.56);
}
.th-modal-subject-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px; color: var(--off-white);
}
.th-modal-subject-input::placeholder { color: rgba(240,234,216,.26); }
.th-modal-body {
  flex: 1; width: 100%; min-height: 170px;
  background: none; border: none; outline: none; resize: none;
  padding: 14px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px; line-height: 1.65; color: var(--off-white);
}
.th-modal-body::placeholder { color: rgba(240,234,216,.26); }
.th-modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; gap: 12px;
  border-top: 1px solid rgba(201, 162, 39, 0.12);
  background: #121c13; flex-shrink: 0;
}
.th-modal-feedback {
  font-size: 12px; color: var(--gold); flex: 1; line-height: 1.4;
}
.th-modal-send {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 22px; background: var(--gold); color: var(--black);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border: none; border-radius: 2px; cursor: pointer;
  transition: background .2s ease; flex-shrink: 0;
}
.th-modal-send:hover { background: var(--gold-light); }
.th-modal-send:disabled { opacity: .5; cursor: not-allowed; }

/* Form sent confirmation */
.th-form-sent { padding: 40px 24px; text-align: center; }
.th-form-sent-check { font-size: 32px; color: var(--gold); margin-bottom: 14px; line-height: 1; }
.th-form-sent-title {
  font-family: Cinzel, Georgia, serif; font-size: 18px;
  font-weight: 600; letter-spacing: .1em; color: var(--off-white); margin-bottom: 8px;
}
.th-form-sent-body { font-size: 14px; color: rgba(240,234,216,.62); line-height: 1.65; }

@media (max-width: 560px) {
  .th-modal-body { min-height: 130px; }
}
.th-modal-privacy {
  margin: 0;
  padding: 10px 18px;
  border-top: 1px solid rgba(201, 162, 39, .15);
  color: rgba(240, 234, 216, .58);
  font-size: 11px;
  line-height: 1.5;
}

.th-modal-privacy a {
  color: var(--gold-light, #efd974);
}
