/* ===== Trilhas — Catálogo ===== */

/* Cabeçalho */
.stmw-trail-title {
  font-weight: 700;
  letter-spacing: -0.2px;
}

.stmw-trail-subtitle {
  font-size: 14px;
}

/* ===== Card de filtros (desktop) ===== */
.stmw-trail-filter-card {
  border-radius: var(--stmw-radius-card, 12px);
}

.stmw-trail-filter-card .card-body {
  padding: 1.25rem 1.5rem;
}

.stmw-trail-filter-divider {
  border-color: var(--bs-border-color);
  opacity: 0.6;
}

/* Linha de filtros */
.stmw-trail-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.stmw-trail-filter-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stmw-trail-filter-group .form-select,
.stmw-trail-filter-group .stmw-trail-select {
  min-width: 150px;
}

/* Esconde selects nativos que serão substituídos pelo Select2 */
.stmw-trail-select {
  visibility: hidden;
  height: 38px;
}

.stmw-trail-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.stmw-trail-filter-switch-group {
  flex-shrink: 0;
}

.stmw-trail-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 2.5em;
  margin-bottom: 0;
  height: 38px;
}

.stmw-trail-filter-clear-group {
  margin-left: auto;
  flex-shrink: 0;
}

.stmw-trail-btn-clear {
  height: 38px;
  white-space: nowrap;
}

/* Select2 — ajuste de altura para combinar com Bootstrap */
.stmw-trail-filter-card .select2-container--default .select2-selection--single {
  height: 38px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.stmw-trail-filter-card .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
}

/* ===== Mobile — Botão filtro ===== */
.stmw-trail-btn-filter-mobile {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  position: relative;
  padding: 0.375rem 0.75rem;
}

.stmw-trail-filter-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--stmw-primary, #6337fe);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 4px;
}

/* ===== Offcanvas — Mobile ===== */
.stmw-trail-offcanvas {
  width: 320px;
}

.stmw-trail-offcanvas .offcanvas-header {
  padding: 1rem 1.25rem;
}

.stmw-trail-offcanvas .offcanvas-body {
  padding: 1.25rem;
}

.stmw-trail-offcanvas-fields {
  flex: 1;
}

.stmw-trail-offcanvas-switch {
  padding: 14px 0;
  border-top: 1px solid var(--bs-border-color);
  margin-top: 4px;
}

.stmw-trail-offcanvas-actions {
  padding-top: 1rem;
}

/* ===== Contador de resultados ===== */
.stmw-trail-result-card {
  border-radius: var(--stmw-radius-card, 12px);
}

.stmw-trail-result-count-body {
  padding: 0.75rem 1.5rem;
}

.stmw-trail-result-count {
  font-size: 13px;
  color: var(--bs-secondary-color);
}

.stmw-trail-result-count strong {
  color: var(--bs-body-color);
  font-weight: 600;
}

/* ===== Card de trilha ===== */
.stmw-trail-card {
  border-radius: var(--stmw-radius-card, 12px);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stmw-trail-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Thumbnail */
.stmw-trail-thumb-wrap {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}

.stmw-trail-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Capa gerada por CSS (sem thumbnail) ─── */
.stmw-trail-default-cover {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--cover-color) 90%, #000 10%) 0%,
    color-mix(in srgb, var(--cover-color) 60%, #fff 40%) 100%
  );
}

/* Padrão geométrico via SVG inline no pseudo-elemento */
.stmw-trail-default-cover__pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 20% 20%,
      rgba(255,255,255,0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(0,0,0,0.15) 0%,
      transparent 50%
    );
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.06) 0px,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent 18px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.06) 0px,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent 18px
    ),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15) 0%, transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(0,0,0,0.18) 0%, transparent 50%);
}

.stmw-trail-default-cover__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1rem 1.1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 60%);
}

.stmw-trail-default-cover__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  font-size: 4rem;
  color: rgba(255,255,255,0.25);
  pointer-events: none;
}

.stmw-trail-default-cover__disc {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.25rem;
  display: block;
}

.stmw-trail-default-cover__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.stmw-trail-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stmw-trail-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* Micro-info (módulos, horas, nível) */
.stmw-trail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}

.stmw-trail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stmw-trail-meta i {
  font-size: 14px;
}

/* Barra de progresso */
.stmw-trail-progress {
  height: 6px;
  border-radius: 3px;
}

/* Badge de status — Concluída */
.stmw-trail-badge-done {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* CTA bloqueada */
.stmw-trail-locked-hint {
  font-size: 11px;
  color: var(--bs-secondary-color);
  margin-top: 4px;
}

/* ===== Skeleton loading ===== */
.stmw-trail-skeleton .card-body {
  pointer-events: none;
}

.stmw-skel-line {
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bs-tertiary-bg) 25%, var(--bs-secondary-bg) 50%, var(--bs-tertiary-bg) 75%);
  background-size: 200% 100%;
  animation: stmw-shimmer 1.5s ease-in-out infinite;
}

.stmw-skel-thumb {
  aspect-ratio: 3 / 2;
  width: 100%;
  border-radius: 0;
}

.stmw-skel-badges {
  width: 50%;
  height: 20px;
}

.stmw-skel-title {
  width: 70%;
  height: 18px;
}

.stmw-skel-desc {
  width: 100%;
  height: 14px;
}

.stmw-skel-desc-short {
  width: 60%;
  height: 14px;
}

.stmw-skel-meta {
  width: 80%;
  height: 14px;
}

.stmw-skel-btn {
  width: 100%;
  height: 38px;
  border-radius: var(--stmw-radius-btn, 8px);
}

@keyframes stmw-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Paginação ===== */
#trails-pagination .pagination {
  gap: 4px;
}

/* ===== Responsivo ===== */
@media (max-width: 1199.98px) {
  .stmw-trail-filter-row {
    gap: 10px;
  }
}

@media (max-width: 575.98px) {
  .stmw-trail-offcanvas {
    width: 100%;
  }
}

/* ===== Dark mode ===== */
html[data-bs-theme="dark"] .stmw-trail-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

html[data-bs-theme="dark"] .stmw-trail-subtitle {
  color: rgba(255, 255, 255, 0.55);
}

html[data-bs-theme="dark"] .stmw-trail-filter-divider {
  opacity: 0.3;
}

/* ══════════════════════════════════════════════════════
   Mapa da Trilha (show)
   ══════════════════════════════════════════════════════ */

/* ===== Alerta de bloqueio ===== */
.stmw-map-lock-alert {
  background: rgba(255, 62, 29, 0.08);
  border: 1px solid rgba(255, 62, 29, 0.25);
  border-radius: var(--stmw-radius-card, 12px);
  padding: 1.25rem 1.5rem;
  color: var(--bs-body-color);
}

.stmw-map-lock-icon {
  font-size: 28px;
  color: #ff3e1d;
  margin-top: 2px;
}

/* ===== Header card ===== */
.stmw-map-header-card {
  border-radius: var(--stmw-radius-card, 12px);
  overflow: hidden;
}

.stmw-map-header-thumb-wrap {
  height: 100%;
  min-height: 200px;
  aspect-ratio: 3 / 2;
  background: var(--bs-tertiary-bg);
  position: relative;
  overflow: hidden;
}

.stmw-map-header-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Thumbnail preview (create/edit forms) */
.stmw-thumb-preview-wrap {
  max-width: 320px;
  aspect-ratio: 3 / 2;
  border-radius: var(--stmw-radius-card, 12px);
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}

.stmw-thumb-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stmw-map-header-info {
  padding: 1.5rem;
}

/* ===== Títulos de seção ===== */
.stmw-map-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stmw-map-section-title i {
  font-size: 1.125rem;
  color: var(--stmw-primary, #6337fe);
}

/* ===== Checklist ===== */
.stmw-map-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stmw-map-checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.stmw-map-checklist-item.is-done {
  color: var(--bs-body-color);
}

.stmw-map-checklist-item.is-pending {
  color: var(--bs-secondary-color);
}

.stmw-map-checklist-item i {
  font-size: 18px;
  flex-shrink: 0;
}

/* ===== Accordion de módulos ===== */
.stmw-map-modules .accordion-item {
  border-radius: var(--stmw-radius-card, 12px) !important;
  margin-bottom: 0.75rem;
  border: 1px solid var(--bs-border-color);
  overflow: hidden;
}

.stmw-map-modules .accordion-button {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  background: transparent;
  box-shadow: none;
}

.stmw-map-modules .accordion-button:not(.collapsed) {
  background: transparent;
  color: var(--bs-body-color);
}

.stmw-map-module-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.stmw-map-module-status-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.stmw-map-module-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stmw-map-module-progress {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
}

.stmw-map-module.is-locked .accordion-button {
  opacity: 0.55;
}

/* ===== Item de aula ===== */
.stmw-map-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color);
  transition: background 0.15s ease;
}

.stmw-map-lesson:last-child {
  border-bottom: none;
}

.stmw-map-lesson:hover:not(.is-locked) {
  background: rgba(0, 0, 0, 0.02);
}

.stmw-map-lesson-status {
  flex-shrink: 0;
}

.stmw-map-lesson-status i {
  font-size: 22px;
}

.stmw-map-lesson-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stmw-map-lesson-title {
  font-weight: 600;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

a.stmw-map-lesson-title:hover {
  color: var(--stmw-primary, #6337fe);
}

.stmw-map-lesson-meta {
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.stmw-map-lesson-meta i {
  font-size: 14px;
  vertical-align: -1px;
}

.stmw-map-lesson-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.stmw-map-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  white-space: nowrap;
}

.stmw-map-lesson.is-locked {
  opacity: 0.45;
  pointer-events: none;
}

.stmw-map-lesson.is-completed .stmw-map-lesson-title {
  color: var(--bs-secondary-color);
}

/* ===== Drag & Drop reordering ===== */
.stmw-drag-handle {
  cursor: grab;
  color: var(--bs-secondary-color);
  font-size: 20px;
  flex-shrink: 0;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1;
}

.stmw-drag-handle:hover {
  color: var(--bs-body-color);
  background: rgba(0, 0, 0, 0.06);
}

.stmw-drag-handle:active {
  cursor: grabbing;
}

.stmw-dragging {
  opacity: 0.4;
}

.stmw-drag-over {
  border-top: 2px solid var(--stmw-primary, #6337fe) !important;
}

.stmw-drag-over-bottom {
  border-bottom: 2px solid var(--stmw-primary, #6337fe) !important;
}

/* Section item drag styling */
.section-item.stmw-dragging {
  opacity: 0.4;
  background: var(--bs-tertiary-bg);
}

.section-item.stmw-drag-over {
  border-top-color: var(--stmw-primary, #6337fe);
}

/* Content block drag styling */
.content-block.stmw-dragging {
  opacity: 0.4;
}

.content-block.stmw-drag-over {
  border-top-color: var(--stmw-primary, #6337fe);
}

/* Drag ghost (lifted item) */
.stmw-drag-ghost {
  transform: rotate(1deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Reorder toast feedback */
.stmw-reorder-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1080;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--bs-body-color);
  color: var(--bs-body-bg);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  animation: stmw-toast-in 0.25s ease-out;
}

.stmw-reorder-toast.stmw-toast-out {
  animation: stmw-toast-out 0.2s ease-in forwards;
}

@keyframes stmw-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes stmw-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}

html[data-bs-theme="dark"] .stmw-drag-handle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ===== Collapsible sections & blocks ===== */
.stmw-collapse-toggle {
  background: none;
  border: none;
  padding: 2px 6px;
  cursor: pointer;
  color: var(--bs-secondary-color);
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.stmw-collapse-toggle:hover {
  color: var(--bs-body-color);
  background: rgba(0, 0, 0, 0.06);
}

.stmw-collapse-toggle.is-collapsed {
  transform: rotate(-90deg);
}

.stmw-collapsible {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
  max-height: 2000px;
  opacity: 1;
}

.stmw-collapsible.is-collapsed {
  max-height: 0 !important;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Section collapsed summary */
.section-item .section-header .stmw-collapse-summary {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  display: none;
}

.section-item.is-section-collapsed .section-header .stmw-collapse-summary {
  display: inline;
}

/* Block collapsed: hide everything below the header row */
.content-block.is-block-collapsed > *:not(.d-flex:first-child):not(:first-child) {
  display: none !important;
}

.content-block.is-block-collapsed {
  padding-bottom: 0.5rem !important;
}

/* Block collapsed summary chip */
.content-block .stmw-block-summary {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  display: none;
  margin-left: 4px;
}

.content-block.is-block-collapsed .stmw-block-summary {
  display: inline;
}

html[data-bs-theme="dark"] .stmw-collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ===== Sidebar ===== */
.stmw-map-sidebar {
  position: sticky;
  top: 5rem;
}

/* Progress card */
.stmw-map-progress-details {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bs-border-color);
}

.stmw-map-progress-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Ranking card */
.stmw-map-ranking-position {
  margin-top: 0.5rem;
}

.stmw-map-ranking-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--stmw-primary, #6337fe);
  line-height: 1;
}

/* ===== Modal Vídeo ===== */
.stmw-map-video-placeholder {
  aspect-ratio: 16 / 9;
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
}

.stmw-map-video-placeholder i {
  font-size: 56px;
  color: rgba(255, 255, 255, 0.8);
}

.stmw-map-video-placeholder span {
  font-size: 13px;
}

/* ===== Modal Materiais ===== */
.stmw-map-material-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.stmw-map-material-item:last-child {
  border-bottom: none;
}

.stmw-map-material-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(99, 55, 254, 0.1);
  color: var(--stmw-primary, #6337fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stmw-map-material-info {
  flex: 1;
  min-width: 0;
}

.stmw-map-material-name {
  font-weight: 600;
  font-size: 0.875rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stmw-map-material-size {
  font-size: 12px;
  color: var(--bs-secondary-color);
}

/* ===== Modal Avaliação ===== */
.stmw-map-assessment-step {
  padding: 1rem 0;
}

.stmw-map-assessment-result {
  text-align: center;
  padding: 1.5rem 0;
}

.stmw-map-assessment-score {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin: 0.5rem 0;
}

/* ===== Modal Ranking — Tabela ===== */
.stmw-map-ranking-table {
  font-size: 0.875rem;
}

.stmw-map-ranking-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--bs-secondary-color);
  font-weight: 600;
  border-bottom-width: 2px;
}

.stmw-map-ranking-highlight {
  background: rgba(99, 55, 254, 0.06) !important;
}

.stmw-map-ranking-highlight td {
  font-weight: 600;
  color: var(--stmw-primary, #6337fe);
}

.stmw-map-ranking-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bs-tertiary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--bs-secondary-color);
}

.stmw-map-ranking-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.stmw-map-ranking-medal-1 { background: #ffc107; }
.stmw-map-ranking-medal-2 { background: #adb5bd; }
.stmw-map-ranking-medal-3 { background: #cd7f32; }

/* ===== Responsivo — Mapa ===== */
@media (max-width: 991.98px) {
  .stmw-map-sidebar {
    position: static;
  }

  .stmw-map-header-thumb-wrap {
    min-height: 160px;
    max-height: 220px;
  }

  .stmw-map-action-label {
    display: none;
  }

  .stmw-map-action-btn {
    padding: 4px 8px;
  }
}

@media (max-width: 575.98px) {
  .stmw-map-lesson {
    flex-wrap: wrap;
  }

  .stmw-map-lesson-actions {
    width: 100%;
    padding-top: 8px;
    padding-left: 34px;
  }

  .stmw-map-action-label {
    display: inline;
  }
}

/* ===== Dark mode — Mapa ===== */
html[data-bs-theme="dark"] .stmw-map-lock-alert {
  background: rgba(255, 62, 29, 0.12);
  border-color: rgba(255, 62, 29, 0.3);
}

html[data-bs-theme="dark"] .stmw-map-lesson:hover:not(.is-locked) {
  background: rgba(255, 255, 255, 0.03);
}

html[data-bs-theme="dark"] .stmw-map-material-icon {
  background: rgba(99, 55, 254, 0.2);
}

html[data-bs-theme="dark"] .stmw-map-ranking-highlight {
  background: rgba(99, 55, 254, 0.12) !important;
}

/* ===== CTA Banner — Usuário sem assinatura ===== */

.sw-cta-banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #6337fe;
  padding: 2.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(99, 55, 254, 0.28), 0 2px 8px rgba(0,0,0,0.08);
}

/* Decoração geométrica de fundo */
.sw-cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 90% 50%, rgba(207,254,90,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% -10%, rgba(255,255,255,0.07) 0%, transparent 60%);
  pointer-events: none;
}

/* Círculos decorativos */
.sw-cta-banner::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid rgba(207,254,90,0.2);
  pointer-events: none;
}

.sw-cta-deco-ring {
  position: absolute;
  right: 20px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(207,254,90,0.12);
  pointer-events: none;
}

.sw-cta-icon-wrap {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(207,254,90,0.15);
  border: 1.5px solid rgba(207,254,90,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #cffe5a;
}

.sw-cta-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.sw-cta-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #cffe5a;
  margin-bottom: 0.35rem;
}

.sw-cta-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.4rem;
  letter-spacing: -0.3px;
}

.sw-cta-desc {
  font-size: 0.855rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 0;
  line-height: 1.5;
}

.sw-cta-actions {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.sw-cta-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 1.35rem;
  border-radius: 8px;
  background: #cffe5a;
  color: #2a1a6e;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(207,254,90,0.3);
  white-space: nowrap;
}

.sw-cta-btn-primary:hover {
  background: #d9ff6a;
  color: #1a0e4a;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(207,254,90,0.45);
  text-decoration: none;
}

.sw-cta-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
  justify-content: flex-end;
}

.sw-cta-btn-secondary:hover {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
}

/* Variante compacta para uso inline */
.sw-cta-banner--compact {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  gap: 1rem;
}

.sw-cta-banner--compact .sw-cta-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
}

.sw-cta-banner--compact .sw-cta-title {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.sw-cta-banner--compact .sw-cta-desc {
  font-size: 0.8rem;
}

/* ─── Inline lock badge nos cards de trilha ─────── */
.sw-trail-lock-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(99,55,254,0.06);
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  z-index: 2;
}

.sw-trail-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6337fe;
  background: rgba(99,55,254,0.1);
  border: 1px solid rgba(99,55,254,0.18);
  border-radius: 6px;
  padding: 3px 8px;
  margin: 0 0.75rem 0.75rem;
  letter-spacing: 0.2px;
}

/* Responsive */
@media (max-width: 575.98px) {
  .sw-cta-banner {
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
  }
  .sw-cta-actions {
    width: 100%;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .sw-cta-btn-secondary {
    justify-content: flex-start;
  }
  .sw-cta-title {
    font-size: 1.1rem;
  }
}

html[data-bs-theme="dark"] .sw-cta-banner {
  box-shadow: 0 8px 32px rgba(99, 55, 254, 0.38), 0 2px 8px rgba(0,0,0,0.22);
}

html[data-bs-theme="dark"] .sw-trail-lock-badge {
  background: rgba(99,55,254,0.18);
  border-color: rgba(99,55,254,0.3);
}
