/**
 * Filtru circumscripție – bara + modal pe pagina /calendar.
 * Stil aliniat cu paleta CEC (#003399 / #1a3c6e) și cu region_search-ul de pe homepage.
 */

/* ════════════════════════════════════════════
   BARA DE FILTRU
════════════════════════════════════════════ */
.cec-cal-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 20px 0;
  padding: 14px 18px;
  background: #f7f9fc;
  border: 1px solid #e2e6ed;
  border-radius: 10px;
}

.cec-cal-filter-label {
  font-weight: 600;
  color: #1a3c6e;
  font-size: 15px;
  margin: 0;
}

.cec-cal-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 280px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #c4ccda;
  border-radius: 8px;
  font-size: 14px;
  color: #1a3c6e;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cec-cal-filter-btn:hover,
.cec-cal-filter-btn:focus {
  border-color: #003399;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.12);
  outline: none;
}

.cec-cal-filter-caret {
  font-size: 12px;
  color: #6b7585;
  flex-shrink: 0;
}

.cec-cal-filter-reset {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #c4ccda;
  background: #fff;
  color: #6b7585;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cec-cal-filter-reset:hover {
  background: #003399;
  color: #fff;
  border-color: #003399;
}

/* ════════════════════════════════════════════
   MODAL OVERLAY
════════════════════════════════════════════ */
.circum-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 20, 60, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.circum-overlay.show {
  display: block;
  animation: cec-cal-fadein 0.2s ease;
}

/* ════════════════════════════════════════════
   MODAL WINDOW
════════════════════════════════════════════ */
.circum-modal {
  display: none;
  position: fixed;
  z-index: 1060;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 540px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 20, 60, 0.25);
  flex-direction: column;
  overflow: hidden;
}

.circum-modal.show {
  display: flex;
  animation: cec-cal-slide 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.circum-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #ebeef3;
  flex-shrink: 0;
}

.circum-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a3c6e;
  margin: 0;
}

.circum-modal-close {
  background: none;
  border: none;
  color: #a0aab8;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.circum-modal-close:hover {
  background: #f0f2f6;
  color: #1a3c6e;
}

.circum-modal-search-wrap {
  padding: 14px 22px 10px;
  flex-shrink: 0;
}

.circum-modal-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #c4ccda;
  border-radius: 8px;
  font-size: 14px;
  color: #1a3c6e;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.circum-modal-search:focus {
  outline: none;
  border-color: #003399;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.12);
}

.circum-modal-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.circum-option {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 18px;
  color: #1a3c6e;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.circum-option:hover {
  background: #f0f4fa;
  border-color: #d6dce6;
}

.circum-option.is-selected {
  background: #003399;
  color: #fff;
  border-color: #003399;
  font-weight: 600;
}

.circum-option.is-selected mark {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.circum-option mark {
  background: #fff3a3;
  color: #1a3c6e;
  padding: 0 2px;
  border-radius: 2px;
}

.circum-modal-no-results {
  padding: 20px 22px;
  text-align: center;
  color: #6b7585;
  font-size: 14px;
}

/* ════════════════════════════════════════════
   ANIMAȚII
════════════════════════════════════════════ */
@keyframes cec-cal-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cec-cal-slide {
  from { opacity: 0; transform: translate(-50%, -16px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 576px) {
  .cec-cal-filter-bar {
    padding: 12px 14px;
    gap: 8px;
  }
  .cec-cal-filter-btn {
    min-width: 0;
    width: 100%;
  }
  .circum-modal {
    top: 40px;
    width: 96%;
    max-height: calc(100vh - 60px);
  }
}

/* ════════════════════════════════════════════
   PREFIX CIRCUMSCRIPȚIE PE BARA DE EVENIMENT
════════════════════════════════════════════ */
.fc-event .cec-event-circum,
.fc-time-grid-event .cec-event-circum {
  display: inline-block;
  background: rgba(255, 255, 255, 0.92);
  color: #1a3c6e;
  font-weight: 600;
  font-size: 0.85em;
  padding: 0 6px;
  margin-right: 4px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.4;
}

/* În listYear: prefixul e text inline, fără pill — îl evidențiem doar prin culoare/weight. */
.fc-list-item .cec-event-circum {
  color: #003399;
  font-weight: 600;
}
