/* ════════════════════════════════════════
   ADMIN CALENDAR WIDGET — Capital DF
   ════════════════════════════════════════ */

.ac-root {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
}

.ac-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface-2);
  gap: 1rem;
  flex-wrap: wrap;
}

.ac-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.ac-title__month {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--admin-text);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ac-title__year {
  font-size: .95rem;
  color: var(--admin-text-muted);
  font-weight: 500;
}
.ac-title__select {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
  border-radius: 6px;
  padding: .35rem .7rem;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239ba3ad'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .55rem center;
  background-size: 8px;
  padding-right: 1.6rem;
}
.ac-title__select:hover,
.ac-title__select:focus {
  border-color: var(--admin-accent);
}
.ac-title__month-select {
  text-transform: uppercase;
  letter-spacing: .5px;
  min-width: 120px;
}
.ac-title__year-select {
  min-width: 80px;
}

.ac-nav {
  display: flex;
  gap: .35rem;
}
.ac-nav__btn {
  min-width: 36px;
  height: 32px;
  padding: 0 .75rem;
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  color: var(--admin-text);
  border-radius: 6px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.ac-nav__btn:hover {
  border-color: var(--admin-accent);
  color: var(--admin-accent);
}

.ac-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ac-grid thead th {
  padding: .6rem .75rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--admin-text-muted);
  text-align: left;
  background: var(--admin-surface-2);
  border-bottom: 1px solid var(--admin-border);
}
.ac-grid td.ac-cell {
  vertical-align: top;
  height: 110px;
  padding: .4rem;
  border-right: 1px solid var(--admin-border);
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface);
  position: relative;
  overflow: hidden;
}
.ac-grid td.ac-cell:last-child { border-right: none; }
.ac-grid tbody tr:last-child td { border-bottom: none; }

.ac-cell--outside {
  background: var(--admin-bg);
}
.ac-cell--outside .ac-cell__day {
  color: var(--admin-text-muted);
  opacity: .5;
}
.ac-cell--weekend:not(.ac-cell--outside) {
  background: var(--admin-surface-2);
}

.ac-cell__day {
  font-size: .82rem;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: .3rem;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ac-cell--today .ac-cell__day {
  background: var(--admin-accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
}

.ac-cell__events {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ── Evento chip (label padrão para múltiplos eventos / eventos genéricos) ── */
.ac-event {
  display: block;
  width: 100%;
  text-align: left;
  padding: 3px 7px;
  border-radius: 4px;
  border: none;
  background: rgba(69, 167, 218, .15);
  color: var(--admin-accent);
  font-size: .72rem;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 3px solid var(--admin-accent);
  transition: all .15s;
  font-family: inherit;
}
.ac-event:hover {
  background: var(--admin-accent);
  color: #fff;
  transform: translateX(2px);
}
.ac-event.is-selected {
  background: var(--admin-accent);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(69, 167, 218, .35);
}

.ac-event--done {
  background: rgba(16,185,129,.15);
  color: #10b981;
  border-left-color: #10b981;
}
.ac-event--done:hover,
.ac-event--done.is-selected {
  background: #10b981;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(16,185,129,.3);
}

.ac-event--away {
  background: rgba(108,117,125,.15);
  color: #9ba3ad;
  border-left-color: #9ba3ad;
}
.ac-event--away:hover {
  background: #6c757d;
  color: #fff;
}

.ac-event--hidden {
  opacity: .55;
}

.ac-event__icon {
  margin-right: 3px;
  font-size: .7rem;
}

.ac-more {
  font-size: .68rem;
  color: var(--admin-text-muted);
  padding: 1px 6px;
  font-style: italic;
  cursor: pointer;
}
.ac-more:hover {
  color: var(--admin-accent);
}

.ac-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--admin-text-muted);
  font-size: .9rem;
}

/* ════════════════════════════════════════
   MATCH CELL — Partida de futebol (full-cell)
   ════════════════════════════════════════ */

/* Célula estilo partida de futebol */
.ac-cell--match {
  background: linear-gradient(135deg, rgba(69,167,218,.10) 0%, rgba(69,167,218,.04) 100%);
}
.ac-cell--match:hover {
  background: linear-gradient(135deg, rgba(69,167,218,.18) 0%, rgba(69,167,218,.08) 100%);
}

/* Finalizado */
.ac-cell--match-done {
  background: linear-gradient(135deg, rgba(16,185,129,.12) 0%, rgba(16,185,129,.04) 100%);
}
.ac-cell--match-done:hover {
  background: linear-gradient(135deg, rgba(16,185,129,.20) 0%, rgba(16,185,129,.08) 100%);
}

/* Fora de casa */
.ac-cell--match-away {
  background: linear-gradient(135deg, rgba(108,117,125,.12) 0%, rgba(108,117,125,.04) 100%);
}
.ac-cell--match-away:hover {
  background: linear-gradient(135deg, rgba(108,117,125,.20) 0%, rgba(108,117,125,.08) 100%);
}

/* Selecionado */
.ac-cell--match-selected {
  background: linear-gradient(135deg, rgba(69,167,218,.25) 0%, rgba(69,167,218,.12) 100%);
  box-shadow: inset 0 0 0 2px var(--admin-accent);
}

/* Botão de match ocupa toda a célula */
.ac-match {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  padding: .35rem .25rem;
  gap: 2px;
  font-family: inherit;
  min-height: 100px;
}

/* Topo: competição + horário */
.ac-match__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
}
.ac-match__comp {
  font-size: .58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--admin-accent);
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.2;
}
.ac-match__hora {
  font-size: .6rem;
  color: var(--admin-text-muted);
  font-weight: 500;
}

/* Times: escudo vs escudo */
.ac-match__teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  width: 100%;
}
.ac-match__team {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ac-match__escudo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 2px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
}
.ac-match__escudo-placeholder {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-text-muted);
  font-size: 1.1rem;
  opacity: .5;
}
.ac-match__vs {
  font-size: .6rem;
  font-weight: 700;
  color: var(--admin-text-muted);
  text-transform: uppercase;
}

/* Placar (finalizado) */
.ac-match__placar {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .9rem;
  font-weight: 800;
  color: var(--admin-text);
  line-height: 1;
}
.ac-match__placar-sep {
  font-size: .65rem;
  font-weight: 600;
  color: var(--admin-text-muted);
}

/* Status badge */
.ac-match__status {
  font-size: .55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.5;
}
.ac-match__status--done {
  background: rgba(16,185,129,.15);
  color: #10b981;
}
.ac-match__status--away {
  background: rgba(108,117,125,.15);
  color: #9ba3ad;
}

/* ════════════════════════════════════════
   FILLED CELL — Qualquer evento único no dia
   ════════════════════════════════════════ */
.ac-cell--filled {
  padding: 0 !important;
  cursor: pointer;
  transition: background .2s;
}
.ac-cell--filled .ac-cell__day {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 2;
  font-size: .72rem;
  margin: 0;
}
.ac-cell--filled .ac-cell__events {
  height: 100%;
  gap: 0;
}

/* ── Generic event full-cell (non-football) ── */
.ac-cell--filled:not(.ac-cell--match) {
  background: linear-gradient(135deg, rgba(255,152,0,.10) 0%, rgba(244,67,54,.06) 100%);
}
.ac-cell--filled:not(.ac-cell--match):hover {
  background: linear-gradient(135deg, rgba(255,152,0,.18) 0%, rgba(244,67,54,.10) 100%);
}

.ac-generic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  padding: .35rem .25rem;
  gap: 3px;
  font-family: inherit;
  min-height: 100px;
}
.ac-generic__icon {
  font-size: 1.2rem;
  color: #ff9800;
  opacity: .8;
}
.ac-generic__title {
  font-size: .65rem;
  font-weight: 600;
  color: var(--admin-text);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ac-generic__detail {
  font-size: .55rem;
  color: var(--admin-text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Selected event banner (ingressos page) ── */
.ac-selected-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1.25rem;
  background: linear-gradient(90deg, rgba(69,167,218,.12), transparent);
  border: 1px solid rgba(69,167,218,.25);
  border-radius: 8px;
  margin-top: .75rem;
}
.ac-selected-banner__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--admin-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.ac-selected-banner__info {
  flex: 1;
  min-width: 0;
}
.ac-selected-banner__label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--admin-text-muted);
  font-weight: 600;
}
.ac-selected-banner__name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-selected-banner__date {
  font-size: .8rem;
  color: var(--admin-text-muted);
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .ac-grid td.ac-cell { height: 82px; padding: .25rem; }
  .ac-cell__day { font-size: .72rem; width: 20px; height: 20px; }
  .ac-event { font-size: .62rem; padding: 1px 4px; border-left-width: 2px; }
  .ac-event__title { max-width: 60px; display: inline-block; overflow: hidden; text-overflow: ellipsis; }
  .ac-grid thead th { font-size: .6rem; padding: .4rem .3rem; }
  .ac-more { font-size: .6rem; }
  /* Match cell mobile */
  .ac-match__escudo { width: 20px; height: 20px; }
  .ac-match__escudo-placeholder { width: 20px; height: 20px; font-size: .85rem; }
  .ac-match__comp { font-size: .5rem; }
  .ac-match__hora { font-size: .5rem; }
  .ac-match__placar { font-size: .7rem; }
  .ac-match__vs { font-size: .5rem; }
  .ac-match__status { font-size: .48rem; }
  .ac-cell--filled .ac-cell__day { font-size: .62rem; top: 2px; left: 3px; }
  .ac-generic__icon { font-size: .9rem; }
  .ac-generic__title { font-size: .55rem; }
  .ac-generic__detail { font-size: .48rem; }
  /* Picker mobile */
  .ac-toolbar { flex-direction: column; align-items: stretch; padding: .75rem 1rem; }
  .ac-title { justify-content: center; }
  .ac-title__select { font-size: .78rem; padding: .3rem .5rem; min-width: 0; }
  .ac-title__month-select { min-width: 100px; }
  .ac-title__year-select { min-width: 70px; }
  .ac-nav { justify-content: center; }
}
