/* =========================================================
   COMPONENTS.CSS
   Peças de UI reutilizadas em várias páginas:
   breadcrumb, search input, botões de ação, modal de
   confirmação e toast de notificação.
   ========================================================= */

/* BREADCRUMB (categories.html / drivers.html) */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
  margin-bottom: 24px; font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb svg { width: 12px; height: 12px; }

/* SEARCH INPUT (categories.html / drivers.html) */
.search-wrap { position: relative; }
.search-input {
  width: 100%; background: var(--card2); border: 1px solid var(--border); color: var(--white);
  padding: 11px 14px 11px 38px; font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 500;
  outline: none; transition: border-color .2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--red); }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); width: 15px; height: 15px; pointer-events: none;
}

/* Variante arredondada usada em categories.html */
.search-input.rounded { padding: 12px 14px 12px 40px; border-radius: 4px; background: var(--card); }
.search-wrap.spaced { margin-bottom: 24px; }

/* BOTÃO DE AÇÃO circular (estrela, info, etc.) */
.action-btn {
  width: 34px; height: 34px; border-radius: 50%; background: var(--card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted);
  flex-shrink: 0; transition: border-color .2s, color .2s, background .2s;
}
.action-btn svg { width: 15px; height: 15px; }
.action-btn:hover { border-color: var(--white); color: var(--white); }
.star-btn.starred { border-color: #f59e0b !important; color: #f59e0b !important; background: rgba(245,158,11,0.1) !important; }
.star-btn.starred svg { fill: #f59e0b; }

/* ================= MODAL DE CONFIRMAÇÃO ================= */
/* Usado em drivers.html e profile.html para confirmar remoção de favoritos */
.confirm-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  z-index: 1000; align-items: center; justify-content: center;
}
.confirm-modal-box {
  background: var(--card); border: 1px solid var(--border); padding: 28px;
  max-width: 400px; width: 90%; text-align: center;
}
.confirm-modal-title {
  font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 900;
  text-transform: uppercase; margin-bottom: 10px;
}
.confirm-modal-text { font-size: 14px; color: var(--light); margin-bottom: 24px; }
.confirm-modal-actions { display: flex; gap: 12px; justify-content: center; }
.confirm-modal-btn {
  border: none; padding: 8px 20px; font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; text-transform: uppercase; cursor: pointer;
}
.confirm-modal-btn.cancel { background: transparent; border: 1px solid var(--border); color: var(--white); }
.confirm-modal-btn.confirm { background: var(--red); color: var(--white); }

/* ================= TOAST DE NOTIFICAÇÃO ================= */
/* Usado em drivers.html (fica por baixo da navbar) */
.toast {
  position: fixed;
  top: 80px; /* debaixo da navbar de 64px */
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--card2);
  border: 1px solid var(--border);
  border-left: 4px solid #22c55e;
  color: var(--white);
  padding: 14px 24px;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s, visibility 0.4s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}
.toast svg { width: 18px; height: 18px; color: #22c55e; flex-shrink: 0; }

@media (max-width: 640px) {
  .toast { width: 90%; top: 76px; }
}
