/* ============================================
   ADOPT ME CALCULATOR - Estilos dos Novos Sistemas
   Auth, Trades, Messages, Notifications
   ============================================ */

/* ============================================
   SELETOR DE IDIOMA
   ============================================ */
.lang-selector {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-flag {
  font-size: 1.5rem;
  text-decoration: none;
  opacity: 0.5;
  transition: all 0.2s ease;
  filter: grayscale(80%);
}

.lang-flag:hover {
  opacity: 0.8;
  filter: grayscale(0%);
}

.lang-flag.lang-active {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* Bandeiras como imagens */
.lang-flag-img,
.lang-flag img {
  width: 22px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.08);
  display: inline-block;
  vertical-align: middle;
  filter: grayscale(80%);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.lang-flag:hover img,
.lang-flag:hover .lang-flag-img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.lang-flag.lang-active img,
.lang-flag.lang-active .lang-flag-img {
  filter: grayscale(0%);
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(107,78,230,0.12);
  border-color: rgba(0,0,0,0.12);
}

/* ============================================
   NAVEGAÇÃO ATUALIZADA
   ============================================ */
#main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.nav-user {
  color: var(--cor-destaque);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  background: rgba(255, 217, 61, 0.1);
  border-radius: var(--borda-radius-sm);
}

.nav-logout {
  color: var(--cor-erro) !important;
}

.nav-notif {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--cor-erro);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  text-align: center;
}

/* ============================================
   AUTENTICAÇÃO (Login / Registro / Perfil)
   ============================================ */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  padding: 2rem;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--sombra-card);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--cor-destaque);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--texto-secundario);
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-select {
  background: var(--bg-secundario);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--borda-radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--texto-principal);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-select:focus {
  outline: none;
  border-color: var(--cor-primaria);
}

.btn-auth {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.auth-error {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid var(--cor-erro);
  color: var(--cor-erro);
  padding: 0.75rem;
  border-radius: var(--borda-radius-sm);
  text-align: center;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--texto-muted);
  font-size: 0.85rem;
}

.auth-link a {
  color: var(--cor-primaria);
  text-decoration: none;
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

.profile-info {
  background: var(--bg-secundario);
  padding: 1rem;
  border-radius: var(--borda-radius-sm);
  margin-bottom: 1.5rem;
}

.profile-info p {
  margin-bottom: 0.3rem;
  color: var(--texto-secundario);
}

/* ============================================
   PUBLICAR TROCA (Barra)
   ============================================ */
#publish-trade-bar,
#offer-mode-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  /* padding: 1rem 2rem; */
  /* margin-top: 1.5rem; */
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  /* box-shadow: var(--sombra-card); */
  margin-bottom: 12px;
}

#publish-trade-bar .form-select,
#offer-mode-bar .form-select {
  max-width: 300px;
  display: none;
}

#offer-mode-bar {
  border: 2px solid var(--cor-primaria);
  flex-wrap: wrap;
}

.offer-mode-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--cor-destaque);
  font-weight: 600;
}

.offer-mode-info small {
  color: var(--texto-muted);
  font-weight: 400;
  font-size: 0.8rem;
}

/* ============================================
   PÁGINAS DE TROCAS
   ============================================ */
.trades-page {
  max-width: 1200px;
  margin: 0 auto;
}

.trades-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.trades-header h2 {
  color: var(--cor-destaque);
}

.trades-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.trade-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--texto-secundario);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.trade-tab:hover,
.trade-tab.active {
  color: #fff;
  background: var(--cor-primaria);
  border-color: var(--cor-primaria);
}

.trades-empty {
  text-align: center;
  padding: 3rem;
  color: var(--texto-muted);
  font-size: 1.1rem;
}

.trades-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#trade-search-input {
  flex: 1;
  min-width: 220px;
  background: var(--bg-secundario);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--borda-radius-sm);
  padding: 0.6rem 0.85rem;
  color: var(--texto-principal);
  font-size: 0.9rem;
}

#trade-search-input:focus {
  outline: none;
  border-color: var(--cor-primaria);
}

.trades-grid {
  display: grid;
  /* grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); */
  gap: 1.5rem;
}

/* Trade Card */
.trade-card {
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  overflow: hidden;
  box-shadow: var(--sombra-card);
  transition: transform 0.2s ease;
}

.trade-card-clickable {
  cursor: pointer;
}

.trade-card:hover {
  transform: translateY(-3px);
}

.trade-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.trade-id {
  color: var(--texto-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.trade-status {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-open { background: var(--cor-sucesso); color: #fff; }
.status-negotiating { background: var(--cor-aviso); color: #333; }
.status-accepted { background: var(--cor-primaria); color: #fff; }
.status-declined { background: var(--cor-erro); color: #fff; }
.status-completed { background: #2196F3; color: #fff; }
.status-cancelled { background: #666; color: #fff; }

.trade-card-body {
  display: flex;
  align-items: stretch;
  padding: 1rem;
  gap: 0.5rem;
  /* max-height: 315px; */
  /* overflow-y: scroll; */
}

.trade-side {
  flex: 1;
}

.trade-side h4 {
  font-size: 0.75rem;
  color: var(--texto-muted);
  margin-bottom: 0.5rem;
  text-align: center;
}

.trade-side-total {
  text-align: center;
  /* margin-bottom: 0.45rem; */
  color: var(--texto-secundario);
  font-size: 1.78rem;
}

.trade-side-total strong {
  color: var(--cor-destaque);
}

.trade-separator {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--texto-muted);
  padding: 0 0.5rem;
}

.trade-pets-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  justify-content: center;
  max-height: 310px;
  overflow-y: scroll;
}

.trade-pet-mini {
  width: 90px;
  height: 90px;
  background: var(--bg-secundario);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.trade-pet-mini img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.mini-badge {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.mini-badge-grupo {
  position: absolute;
  top: -3px;
  right: -3px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 2;
}

.mini-badge-extra {
  min-width: 22px;
  height: 22px;
  padding: 0 2px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.trade-empty-side {
  color: var(--texto-muted);
  font-style: italic;
  text-align: center;
  padding: 0.5rem;
}

.trade-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.trade-creator {
  font-size: 0.8rem;
  color: var(--texto-secundario);
}

.trade-offers-count {
  font-size: 0.8rem;
  color: var(--texto-muted);
}

.trade-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-danger {
  background: var(--cor-erro);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
      padding: 9px;
    border-radius: 5px;
}

.btn-danger:hover {
  background: #c0392b;
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-link {
  padding: 0.5rem 0.9rem;
  background: var(--bg-card);
  color: var(--texto-principal);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-link:hover {
  background: var(--bg-hover);
}

.page-link.active {
  background: var(--cor-primaria);
  color: #fff;
}

/* ============================================
   TRADE VIEW PAGE
   ============================================ */
.trade-view-page {
  max-width: 1000px;
  margin: 0 auto;
}

.trade-view-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.trade-view-header h2 {
  color: var(--cor-destaque);
}

.trade-view-items {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  padding: 1.5rem;
}

.trade-view-side {
  flex: 1;
}

.trade-view-side h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--cor-destaque);
  font-size: 1rem;
}

.trade-arrows {
  display: flex;
  align-items: center;
  font-size: 2rem;
  color: var(--texto-muted);
}

.trade-pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

.trade-pet-card {
  background: var(--bg-secundario);
  border-radius: var(--borda-radius-sm);
  padding: 0.5rem;
  text-align: center;
  position: relative;
}

.trade-pet-card img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.trade-pet-name {
  display: block;
  font-size: 0.7rem;
  color: var(--texto-principal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.trade-pet-name-en {
  display: block;
  font-size: 0.6rem;
  color: var(--texto-secundario);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-pet-badges {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin-top: 2px;
}

.trade-pet-qty {
  /* position: absolute; */
  left: 4px;
  bottom: 4px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  /* background: rgba(0, 0, 0, 0.7); */
  padding: 1px 7px;
  /* border-radius: 0px 0px; */
  line-height: 1.2;
  /* margin-top: 10px; */
}

.trade-mini-qty {
  position: absolute;
  left: -4px;
  bottom: 1px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #000000;
  background: rgb(255 255 255 / 78%);
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.1;
  z-index: 3;
}

.trade-owner-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

/* Rating stars: hover preview (no selection change until click) */
.rating-stars .rating-star-option {
  font-size: 1.6rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #ccc;
  transition: color 0.12s ease;
}
.rating-stars .rating-star-option.star-active,
.rating-stars .rating-star-option:hover,
.rating-stars .rating-star-option.hovered {
  color: #ffb400;
}

/* Global confirm modal basic styles (used by layout ejs) */
#global-confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#global-confirm-modal .confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
#global-confirm-modal .confirm-box {
  position: relative;
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  min-width: 320px;
  max-width: 560px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ============================================
   MAKE OFFER SECTION
   ============================================ */
.make-offer-section {
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.make-offer-section h3 {
  color: var(--cor-destaque);
  margin-bottom: 1rem;
}

.offer-instructions {
  color: var(--texto-secundario);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.offer-hint {
  font-size: 0.8rem;
  color: var(--texto-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

/* ============================================
   OFERTAS
   ============================================ */
.trade-offers-section {
  margin-bottom: 2rem;
}

.trade-offers-section h3 {
  color: var(--cor-destaque);
  margin-bottom: 1rem;
}

.offer-card {
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--cor-primaria);
}

.offer-status-accepted {
  border-left-color: var(--cor-sucesso);
}

.offer-status-declined {
  border-left-color: var(--cor-erro);
  opacity: 0.6;
}

.offer-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.offer-user {
  font-size: 0.9rem;
}

.offer-rating {
  font-size: 0.8rem;
  color: var(--cor-destaque);
  margin-left: 0.3rem;
}

.offer-status {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--bg-secundario);
  color: var(--texto-muted);
}

.offer-edited {
  font-size: 0.75rem;
  color: var(--cor-aviso);
  font-style: italic;
}

.offer-items {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.offer-side {
  flex: 1;
}

.offer-side h4 {
  font-size: 0.75rem;
  color: var(--texto-muted);
  margin-bottom: 0.3rem;
  text-align: center;
}

.offer-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Botão de chat na oferta */
.offer-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-offer-chat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--texto-secundario);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-offer-chat:hover {
  background: var(--cor-primaria);
  color: #fff;
  border-color: var(--cor-primaria);
}

/* Chat inline da oferta */
.offer-chat {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.75rem;
}

.offer-messages-log {
  max-height: 250px;
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--bg-secundario);
  border-radius: var(--borda-radius-sm);
  margin-bottom: 0.75rem;
  min-height: 40px;
}

/* ============================================
   MENSAGENS
   ============================================ */
.trade-messages-section {
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.trade-messages-section h3 {
  color: var(--cor-destaque);
  margin-bottom: 1rem;
}

.messages-log {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg-secundario);
  border-radius: var(--borda-radius-sm);
  margin-bottom: 1.5rem;
}

.message-item {
  display: block;
  max-width: 78%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  word-break: break-word;
}

.message-mine {
  margin-left: auto;
  background: rgba(107, 78, 230, 0.18);
  border-left: none;
  border-right: 3px solid var(--cor-primaria);
  text-align: right;
}

.message-other {
  margin-right: auto;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid rgba(255,255,255,0.08);
  text-align: left;
}

.message-sender {
  font-size: 0.75rem;
  color: var(--cor-destaque);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.message-text {
  font-size: 0.9rem;
  color: var(--texto-principal);
}

.message-pet-ref {
  display: block;
  font-size: 0.75rem;
  color: var(--cor-primaria);
  font-style: italic;
  margin-top: 2px;
}

.message-time {
  display: block;
  font-size: 0.65rem;
  color: var(--texto-muted);
  margin-top: 2px;
}

.message-other .message-time {
  text-align: left;
}

.message-mine .message-time {
  text-align: right;
}

.offer-roblox-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.8rem;
}

.offer-roblox-other {
  font-size: 0.88rem;
  color: var(--texto-principal);
  margin-bottom: 0.6rem;
}

.offer-roblox-other {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.offer-roblox-username {
  font-weight: 600;
  color: var(--texto-principal);
}

.copy-roblox-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--texto-principal);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
}
.copy-roblox-btn:active { transform: translateY(1px); }

/* Modals for rating/report */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.modal .modal-box {
  position: relative;
  background: var(--bg-principal);
  padding: 1rem;
  border-radius: 8px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 2;
}
.modal h3 { margin-top: 0; margin-bottom: 0.5rem; }
.modal .modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.75rem; }
.modal textarea { width: 100%; border-radius: 6px; padding: 0.5rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); color: var(--texto-principal); }
.modal select { padding: 0.35rem 0.5rem; border-radius: 6px; }
.rating-controls label, .report-options label { display: block; margin-bottom: 0.35rem; }
.report-options label { display:flex; gap:0.6rem; align-items:center; }

.offer-roblox-other strong {
  color: var(--cor-destaque);
  margin-right: 0.4rem;
}

.offer-roblox-self label {
  display: block;
  font-size: 0.8rem;
  color: var(--texto-muted);
  margin-bottom: 0.3rem;
}

.offer-roblox-self-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.offer-roblox-self-row select {
  background: var(--bg-secundario);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--texto-principal);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  min-width: 170px;
}

/* Offer action buttons: side-by-side and same height */
.offer-actions {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.offer-actions .btn-primario,
.offer-actions .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 0.8rem;
  line-height: 1;
}
.offer-actions .btn-sm {
  height: 36px;
  padding: 0 0.6rem;
}

/* Logo link style to preserve appearance */
.logo .logo-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.logo .logo-link:hover {
  text-decoration: none;
}

.message-compose {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.message-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.message-category h4 {
  font-size: 0.8rem;
  color: var(--texto-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Contador de cooldown: exibir acima de .message-category com fundo preto translúcido */
.message-category {
  position: relative;
  min-height: 84px;
}
.message-category .message-cooldown {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff !important;
  padding: 8px 10px;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
  border-radius: 8px;
  z-index: 60;
  display: none; /* controlado por JS */
  align-items: center;
  justify-content: center;
}

.message-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.msg-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--texto-principal);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.msg-btn-copy {
  min-width: 36px;
  padding: 0.35rem 0.5rem;
  display: none;
}

.message-copy-link {
  color: var(--cor-destaque);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.message-copy-link:hover {
  color: #fff;
}

.msg-btn:hover {
  background: var(--cor-primaria);
  border-color: var(--cor-primaria);
  color: #fff;
}

.message-pet-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.message-pet-link label {
  font-size: 0.8rem;
  color: var(--texto-muted);
}

.message-pet-link select {
  background: var(--bg-secundario);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: var(--texto-principal);
  font-size: 0.8rem;
}

/* ============================================
   AVALIAÇÃO
   ============================================ */
.trade-rating-section {
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.trade-rating-section h3 {
  color: var(--cor-destaque);
  margin-bottom: 1rem;
}

.rating-stars {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.star-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--texto-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.star-btn:hover {
  color: var(--cor-destaque);
  transform: scale(1.2);
}

.star-btn.star-active,
.star-btn.hovered {
  color: var(--cor-destaque);
}

.rating-stars {
  direction: ltr;
}

.trade-rating-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 320;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.trade-rating-modal {
  width: min(460px, 100%);
  background: var(--bg-card);
  border-radius: var(--borda-radius);
  padding: 1.2rem;
  position: relative;
  box-shadow: var(--sombra-hover);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.trade-rating-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--texto-principal);
  cursor: pointer;
}

.trade-rating-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.rating-modal-hint {
  margin: 0.5rem 0 1rem;
  color: var(--texto-secundario);
  font-size: 0.92rem;
}

.rating-stars-modal {
  direction: ltr;
  margin-bottom: 1rem;
}

/* ============================================
   NOTIFICAÇÕES
   ============================================ */
.notifications-page {
  max-width: 700px;
  margin: 0 auto;
}

.notifications-page h2 {
  color: var(--cor-destaque);
  margin-bottom: 1rem;
}

.notif-empty {
  text-align: center;
  padding: 2rem;
  color: var(--texto-muted);
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.notif-item {
  /* background: #6f92bb; */
  border-radius: var(--borda-radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s ease;
  margin-bottom: 10px;
  background-color: #191d35;
}

.notif-unread {
  border-left: 3px solid var(--cor-primaria);
  /* background: rgb(101 101 101 / 10%); */
}

.notif-read {
  opacity: 0.6;
}

.notif-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notif-icon {
  font-size: 1.2rem;
}

.notif-text {
  font-size: 0.9rem;
  color: var(--texto-principal);
}

.notif-link {
  color: var(--cor-primaria);
  font-size: 0.8rem;
  text-decoration: none;
  margin-left: 0.5rem;
}

.notif-link:hover {
  text-decoration: underline;
}

.notif-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notif-time {
  font-size: 0.7rem;
  color: var(--texto-muted);
  white-space: nowrap;
}

/* ============================================
   RESPONSIVIDADE DOS NOVOS SISTEMAS
   ============================================ */

/* --------------------------------------------
   Overlay de Notificações (dropdown/overlay)
   -------------------------------------------- */
.notif-overlay {
  position: absolute;
  /* right: 1rem; */
  top: 64px;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: var(--borda-radius);
  box-shadow: var(--sombra-card);
  display: none;
  z-index: 250;
  padding: 0.5rem;
  /* margin: auto; */
  /* text-align: center; */
  /* left: 30%; */
  max-width: 400px;
}

.notif-overlay.open {
  display: block;
  animation: fadeIn 0.12s ease;
}

.notif-overlay .notif-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 0.5rem;
}

.notif-overlay .notif-overlay-title {
  font-weight: 700;
  color: #191d35;
}

.notif-overlay .notif-overlay-body {
  padding: 0.25rem;
}

.notif-mark-btn {
  /* background: transparent; */
  border: none;
  color: #cacae1;
  cursor: pointer;
  font-size: 0.95rem;
}

.notif-mark-btn i { color: var(--cor-primaria); }

@media (max-width: 992px) {
  .trades-grid {
    grid-template-columns: 1fr;
  }

  .trade-view-items {
    flex-direction: column;
  }

  .trade-arrows {
    justify-content: center;
    transform: rotate(90deg);
    padding: 0.5rem 0;
  }

  .auth-card {
    padding: 1.5rem 1rem;
  }

  .message-categories {
    flex-direction: column;
  }

  #publish-trade-bar,
  #offer-mode-bar {
    flex-direction: column;
    padding: 1rem;
  }

  .offer-items {
    flex-direction: column;
  }

  .trades-search {
    flex-wrap: wrap;
  }

  #trade-search-input {
    min-width: 100%;
  }
}
