/* ============================================================
   context-filter.css  —  EQI Budget System
   B1 — Filtro Global de Contexto (Entidade + Ciclo) no header.
   ============================================================ */

.gcf-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 0.75rem;
}

/* --- Seletor de Entidade --- */
.gcf-entity {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.gcf-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #6b7280);
  white-space: nowrap;
}

.gcf-select {
  font-size: 0.8rem;
  font-family: inherit;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-sm, 4px);
  background-color: var(--color-surface, #ffffff);
  color: var(--color-text, #111827);
  cursor: pointer;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gcf-select:hover {
  border-color: var(--color-primary, #2563eb);
}

.gcf-select:focus {
  outline: none;
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* --- Separador --- */
.gcf-sep {
  width: 1px;
  height: 20px;
  background-color: var(--color-border, #e5e7eb);
  flex-shrink: 0;
}

/* --- Badge do Ciclo --- */
.gcf-cycle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.6rem;
  background-color: var(--color-surface-alt, #f3f4f6);
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--color-border, #e5e7eb);
}

.gcf-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-success, #10b981);
  flex-shrink: 0;
}

.gcf-badge-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text, #111827);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Responsivo --- */
@media (max-width: 768px) {
  .gcf-container {
    gap: 0.5rem;
    margin-right: 0.5rem;
  }

  .gcf-label {
    display: none;
  }

  .gcf-select {
    max-width: 120px;
    font-size: 0.75rem;
  }

  .gcf-cycle {
    display: none;
  }
}

@media (max-width: 480px) {
  .gcf-container {
    display: none;
  }
}
