/* Seletor de Pals do Montador de Times: desfoque do fundo, painel de filtros recolhível e card com resumo do companheiro. */

/* ---------- Desfoque do fundo (mesmo tratamento de palpedia.css) ---------- */
/* O estilo fica em .modal-backdrop (sem .show) para existir durante toda a animação de abrir e fechar. Se cor e blur
   ficassem presos em .show, o Bootstrap trocaria de imediato para o preto sólido dele ao tirar a classe e a tela
   piscaria ao fechar. A classe mt-blur só sai do body depois do evento hidden.bs.modal. */
body.mt-blur .modal-backdrop {
	background: rgba(6, 8, 14, .72);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

/* opacity < 1 cria um contexto de isolamento e o blur passa a desfocar só o próprio backdrop, não a página atrás. */
body.mt-blur .modal-backdrop.show {
	opacity: 1;
}

/* ---------- Painel de filtros ---------- */
.mt-filtros {
	margin-bottom: 1rem;
	border: 1px solid var(--hairline);
	border-radius: 12px;
	background: color-mix(in srgb, var(--panel) 85%, transparent);
}

.mt-filtros__botao {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .6rem .9rem;
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	user-select: none;
}

.mt-filtros__botao::-webkit-details-marker { display: none; }

.mt-filtros__botao:hover { color: var(--accent); }

.mt-filtros__seta {
	margin-left: auto;
	transition: transform .18s ease;
}

.mt-filtros[open] .mt-filtros__seta { transform: rotate(180deg); }

.mt-filtros__n {
	display: none;
	min-width: 1.35rem;
	padding: 0 .4rem;
	border-radius: 999px;
	background: var(--accent);
	color: #0b0d14;
	font-size: .75rem;
	line-height: 1.35rem;
	text-align: center;
}

.mt-filtros__n.is-on { display: inline-block; }

.mt-filtros__corpo {
	display: grid;
	gap: .55rem;
	padding: .2rem .9rem 1rem;
	border-top: 1px solid var(--hairline);
	max-height: 46vh;
	overflow-y: auto;
}

.mt-filtros__corpo .filter-group-label { margin-top: .65rem; }
.mt-filtros__corpo .filter-group-label small { font-weight: 400; opacity: .7; text-transform: none; letter-spacing: 0; }
.mt-filtros__corpo .filter-group-sublabel { margin-top: .2rem; }

.mt-fchip {
	font: inherit;
	cursor: pointer;
}

.mt-fchip .bi { color: var(--chip-color); margin-right: .3rem; }
.mt-fchip.active .bi { color: inherit; }

.mt-filtros__limpar { justify-self: start; margin-top: .4rem; }

/* ---------- Card de Pal maior, com resumo da Habilidade de Companheiro ---------- */
.mt-pal-grid {
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: .9rem;
	max-height: none;
	overflow: visible;
	padding-right: 0;
}

.mt-pal-grid .pal-card--compact {
	padding: 1rem 1rem 1.1rem;
	align-items: center;
}

.mt-pal-comp {
	align-self: stretch;
	margin-top: .8rem;
	padding: .65rem .75rem;
	border: 1px solid var(--hairline);
	border-left: 3px solid var(--rarity-color, var(--accent));
	border-radius: 8px;
	background: rgba(255, 255, 255, .03);
	text-align: left;
}

.mt-pal-comp__rot {
	display: block;
	font-size: .62rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--text-dim);
}

.mt-pal-comp__nome {
	display: block;
	margin-top: .1rem;
	font-size: .92rem;
	color: var(--text);
}

.mt-pal-comp__desc {
	margin: .3rem 0 0;
	font-size: .78rem;
	line-height: 1.45;
	color: var(--text-dim);
}

.mt-pal-grid .cs-selos { margin-top: .6rem; }

@media (prefers-reduced-motion: reduce) {
	.mt-filtros__seta { transition: none; }
}

/* Caixa do companheiro cresce até o fim do card: as caixas de uma mesma linha terminam alinhadas. */
.mt-pal-grid .pal-card--compact .mt-pal-comp {
	flex: 1 1 auto;
}

.mt-pal-comp--vazio { opacity: .55; border-left-color: var(--hairline); }

/* ---------- Time: Pal Alpha (ícone vermelho) e Pal Despertado (borda dourada cintilante) ---------- */
.montador-slot-retrato {
	position: relative;
	display: grid;
	place-items: center;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	padding: 3px;
}

.montador-slot-retrato img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--panel-2);
	object-fit: cover;
}

/* Ângulo animável do anel dourado (navegadores sem @property mostram o anel parado). */
@property --mt-ang {
	syntax: '<angle>';
	inherits: false;
	initial-value: 0deg;
}

.montador-slot-retrato.is-despertado {
	background: conic-gradient(from var(--mt-ang), #8a5a00, #ffd95a, #fff6c8, #ffd95a, #8a5a00, #c99a1a, #ffe98a, #8a5a00);
	box-shadow: 0 0 10px 1px rgba(255, 205, 70, .55), 0 0 22px 2px rgba(255, 190, 40, .25);
	animation: mt-ouro-giro 4s linear infinite, mt-ouro-brilho 2.4s ease-in-out infinite;
}

@keyframes mt-ouro-giro {
	to { --mt-ang: 360deg; }
}

@keyframes mt-ouro-brilho {
	0%, 100% { box-shadow: 0 0 8px 0 rgba(255, 205, 70, .45), 0 0 18px 1px rgba(255, 190, 40, .2); }
	50% { box-shadow: 0 0 14px 2px rgba(255, 220, 110, .8), 0 0 28px 4px rgba(255, 190, 40, .35); }
}

/* Badges de Alpha e Pal Ativo lado a lado no topo esquerdo; o topo direito é do botão de remover do time. */
.montador-slot-badges {
	position: absolute;
	top: .5rem;
	left: .55rem;
	display: flex;
	align-items: center;
	gap: .3rem;
}

.montador-slot-alpha {
	line-height: 0;
	filter: drop-shadow(0 0 4px rgba(255, 58, 58, .6));
}

.montador-slot-alpha .pal-card-type-icon {
	width: 20px;
	height: 20px;
}

/* Badge do Pal Ativo (o evocado em combate no jogo). */
.montador-slot-ativo {
	line-height: 0;
	color: var(--accent);
	filter: drop-shadow(0 0 4px var(--accent-soft));
}

.montador-slot-ativo i {
	font-size: 1.1rem;
}

.montador-campo--check .pal-card-type-icon {
	width: 16px;
	height: 16px;
	vertical-align: -.2em;
}

@media (prefers-reduced-motion: reduce) {
	.montador-slot-retrato.is-despertado { animation: none; }
}

/* Atributos em equipe */
.montador-dif{ color:#4ade80; font-weight:600; }
.montador-equipe-lista{ list-style:none; margin:.3rem 0 0; padding:0; display:grid; gap:.3rem; }
.montador-equipe-lista li{ font-size:.85rem; }
.montador-equipe-lista small{ color: var(--text-dim); }
