/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ── Sempre bloqueado — evita que o gesto nativo de "puxar para atualizar"
   dispare um reload real durante a transição de abrir/fechar o modal ── */
html, body {
  overscroll-behavior: none;
}

/* ── Footer ── */
.mp-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 16px;
  background: #fff;
  border-top: 1px solid #eee;
  color: #aaa;
}

.mp-footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-footer__logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.mp-footer__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #aaa;
}

.mp-footer__credit {
  margin: 0;
  font-size: 0.7rem;
  color: #ccc;
}

/* ── Modal frame — abre cobrindo a tela, subindo de baixo pra cima ── */
turbo-frame#modal {
  display: none;
}

turbo-frame#modal:not(:empty) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  animation: mp-modal-slide-up 0.28s ease-out;
  background: #fff;
}

html:has(turbo-frame#modal:not(:empty)) {
  overscroll-behavior: none;
}

body:has(turbo-frame#modal:not(:empty)) {
  touch-action: none;
  overscroll-behavior: none;
}

@keyframes mp-modal-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

turbo-frame#modal.mp-modal-closing {
  animation: mp-modal-slide-down 0.24s ease-in forwards;
}

@keyframes mp-modal-slide-down {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

/* ── Primary action button — standard across the app ── */
.mp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #f5a623 0%, #f7c96e 100%);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.35);
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.mp-btn-primary:hover {
  opacity: 0.92;
}

.mp-btn-primary:active {
  transform: scale(0.96);
}

/* ── Toast ── */
@keyframes mp-toast {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  12%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  78%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

.mp-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(26, 26, 46, 0.92);
  color: #fff;
  padding: 12px 22px;
  border-radius: 99px;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  animation: mp-toast 2.4s ease forwards;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
