/* ELEGANT — message modal (shared across all pages) */

.tff-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding:
    calc(16px + env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  animation: ea-modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.tff-modal[hidden] {
  display: none !important;
}

@keyframes ea-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tff-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 18, 0.62);
  backdrop-filter: blur(6px);
}

.tff-modal__box {
  position: relative;
  width: min(300px, 100%);
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: linear-gradient(165deg, #fffdf9 0%, #f8f4ec 100%);
  text-align: center;
  border: 1px solid rgba(184, 149, 74, 0.22);
  box-shadow:
    0 20px 40px rgba(26, 51, 40, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(0);
  animation: ea-modal-box 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ea-modal-box {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tff-modal__text {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #DA291C;
  line-height: 1.5;
}

.tff-modal__actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.tff-modal__btn {
  min-width: 120px;
  min-height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 14px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tff-modal__btn:active {
  transform: scale(0.97);
}

.tff-modal__btn--primary {
  color: #fff9ee;
  background: linear-gradient(180deg, #FF4D3D 0%, #DA291C 100%);
  box-shadow: 0 6px 16px rgba(26, 51, 40, 0.28);
}

.tff-modal__box--success {
  border-color: rgba(184, 149, 74, 0.38);
}

.tff-modal__box--error {
  border-color: rgba(196, 72, 58, 0.32);
}

.tff-modal__box--error .tff-modal__text {
  color: #9a3a2e;
}

.tff-modal__box--error .tff-modal__btn--primary {
  background: linear-gradient(180deg, #c45a4a 0%, #9a3a2e 100%);
  box-shadow: 0 6px 16px rgba(154, 58, 46, 0.25);
}
