/* Tala Prattoy — modern form UX */

:root {
  --tp-bg: #101010;
  --tp-surface: #1b1b1b;
  --tp-text: #ede8e8;
  --tp-muted: #999;
  --tp-accent: #edaf4e;
  --tp-accent-alt: #97cd17;
  --tp-danger: #e85d5d;
  --tp-border: #2a2a2a;
}

.tp-ajax-form .form-group,
.tp-ajax-form .tp-field {
  position: relative;
  margin-bottom: 18px;
}

.tp-ajax-form .tp-error {
  display: none;
  margin-top: 6px;
  color: var(--tp-danger);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.tp-ajax-form .tp-field.is-invalid .tp-error,
.tp-ajax-form .form-group.is-invalid .tp-error {
  display: block;
}

.tp-ajax-form .tp-field.is-invalid input,
.tp-ajax-form .tp-field.is-invalid textarea,
.tp-ajax-form .tp-field.is-invalid select,
.tp-ajax-form .form-group.is-invalid input,
.tp-ajax-form .form-group.is-invalid textarea,
.tp-ajax-form .form-group.is-invalid select {
  border-color: var(--tp-danger) !important;
  box-shadow: 0 0 0 1px rgba(232, 93, 93, 0.35);
}

.tp-ajax-form .tp-field.is-valid input,
.tp-ajax-form .tp-field.is-valid textarea,
.tp-ajax-form .tp-field.is-valid select,
.tp-ajax-form .form-group.is-valid input,
.tp-ajax-form .form-group.is-valid textarea,
.tp-ajax-form .form-group.is-valid select {
  border-color: var(--tp-accent-alt) !important;
}

.tp-ajax-form button[type="submit"],
.tp-ajax-form .tp-submit {
  position: relative;
  min-width: 160px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tp-ajax-form button[type="submit"]:disabled,
.tp-ajax-form .tp-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.tp-checkbox-group.is-invalid {
  outline: 1px solid rgba(232, 93, 93, 0.6);
  outline-offset: 6px;
  border-radius: 4px;
}

.tp-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.tp-loading-overlay.is-active {
  display: flex;
}

.tp-loading-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-top: 3px solid var(--tp-accent);
  border-radius: 12px;
  padding: 28px 36px;
  text-align: center;
  min-width: 220px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.tp-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border: 3px solid rgba(237, 175, 78, 0.2);
  border-top-color: var(--tp-accent);
  border-radius: 50%;
  animation: tp-spin 0.8s linear infinite;
}

.tp-loading-card p {
  margin: 0;
  color: var(--tp-text);
  font-size: 14px;
  letter-spacing: 0.04em;
}

@keyframes tp-spin {
  to { transform: rotate(360deg); }
}

.tp-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
}

.tp-modal.is-open {
  display: flex;
  animation: tp-fade-in 0.25s ease;
}

.tp-modal-dialog {
  width: min(420px, 100%);
  background: linear-gradient(180deg, #1d1d1d 0%, #151515 100%);
  border: 1px solid var(--tp-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(12px);
  animation: tp-rise 0.3s ease forwards;
}

.tp-modal-dialog.is-success { border-top: 3px solid var(--tp-accent-alt); }
.tp-modal-dialog.is-error { border-top: 3px solid var(--tp-danger); }

.tp-modal-body {
  padding: 34px 28px 28px;
  text-align: center;
}

.tp-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
}

.tp-modal-dialog.is-success .tp-modal-icon {
  background: rgba(151, 205, 23, 0.12);
  color: var(--tp-accent-alt);
  box-shadow: 0 0 0 1px rgba(151, 205, 23, 0.35);
}

.tp-modal-dialog.is-error .tp-modal-icon {
  background: rgba(232, 93, 93, 0.12);
  color: var(--tp-danger);
  box-shadow: 0 0 0 1px rgba(232, 93, 93, 0.35);
}

.tp-modal-body h3 {
  margin: 0 0 10px;
  color: var(--tp-text);
  font-size: 22px;
  line-height: 1.3;
}

.tp-modal-body p {
  margin: 0;
  color: var(--tp-muted);
  font-size: 14px;
  line-height: 1.6;
}

.tp-modal-actions {
  padding: 0 28px 28px;
  text-align: center;
}

.tp-modal-close {
  appearance: none;
  border: 1px solid var(--tp-accent);
  background: var(--tp-accent);
  color: #111;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 12px 28px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.tp-modal-close:hover,
.tp-modal-close:focus {
  background: transparent;
  color: var(--tp-accent);
  outline: none;
}

@keyframes tp-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tp-rise {
  to { transform: translateY(0); }
}

@media (max-width: 575px) {
  .tp-modal-body { padding: 28px 20px 20px; }
  .tp-modal-body h3 { font-size: 20px; }
}
