/* ==========================================================================
   Busca Inteligente — Consultório Dra Flórence
   Identidade: dourado / creme / vinho · Playfair Display · DM Sans · Cormorant
   ========================================================================== */

.tccb-bar,
.tccb-results {
	--tccb-dourado: #C9A84C;
	--tccb-dourado-claro: #E8C97A;
	--tccb-dourado-escuro: #9E7B2F;
	--tccb-grad: linear-gradient(135deg, #E8C97A 0%, #C9A84C 50%, #9E7B2F 100%);
	--tccb-branco: #FFFFFF;
	--tccb-branco-quente: #FAF8F4;
	--tccb-creme: #F5F0E8;
	--tccb-vinho: #8B3652;
	--tccb-vinho-escuro: #6B2A3E;
	--tccb-vinho-claro: #F5ECF0;
	--tccb-texto: #3D3530;
	--tccb-medio: #7A7268;
	--tccb-borda: #E8E2D9;
	--tccb-sombra: rgba(201, 168, 76, .14);
	--tccb-body: 'DM Sans', sans-serif;
	--tccb-title: 'Playfair Display', serif;
	--tccb-accent: 'Cormorant Garamond', serif;
	font-family: var(--tccb-body);
	color: var(--tccb-texto);
	box-sizing: border-box;
}
.tccb-bar *, .tccb-bar *::before, .tccb-bar *::after,
.tccb-results *, .tccb-results *::before, .tccb-results *::after { box-sizing: border-box; }

.tccb-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   BARRA DE BUSCA (glassmorphism)
   ========================================================================== */
.tccb-bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: .35rem;
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	padding: .4rem .4rem .4rem 1.15rem;
	border-radius: 999px;
	-webkit-backdrop-filter: blur(18px) saturate(170%);
	backdrop-filter: blur(18px) saturate(170%);
	transition: box-shadow .3s ease, border-color .3s ease, background .3s ease;
	z-index: 50;
}

/* Claro — para fundos brancos/creme */
.tccb-bar--claro {
	background: linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(250, 248, 244, .55));
	border: 1px solid rgba(201, 168, 76, .35);
	box-shadow: 0 10px 34px rgba(158, 123, 47, .13), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.tccb-bar--claro:focus-within {
	border-color: var(--tccb-dourado);
	box-shadow: 0 0 0 4px rgba(201, 168, 76, .18), 0 14px 40px rgba(158, 123, 47, .18), inset 0 1px 0 #fff;
}

/* Escuro — para usar sobre fotos/heros escuros */
.tccb-bar--escuro {
	background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07));
	border: 1px solid rgba(255, 255, 255, .38);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
	color: #fff;
}
.tccb-bar--escuro:focus-within {
	border-color: var(--tccb-dourado-claro);
	box-shadow: 0 0 0 4px rgba(232, 201, 122, .25), 0 14px 44px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.tccb-bar__icon { display: flex; flex-shrink: 0; }
.tccb-bar svg {
	width: 20px; height: 20px; fill: none; stroke: currentColor;
	stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tccb-bar--claro .tccb-bar__icon { color: var(--tccb-dourado-escuro); }
.tccb-bar--escuro .tccb-bar__icon { color: var(--tccb-dourado-claro); }

.tccb-bar .tccb-bar__input,
.tccb-bar .tccb-bar__input:focus {
	flex: 1;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: .75rem .35rem;
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font-family: var(--tccb-body);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	color: inherit;
	-webkit-appearance: none;
	appearance: none;
}
.tccb-bar--claro .tccb-bar__input { color: var(--tccb-texto); }
.tccb-bar--claro .tccb-bar__input::placeholder { color: var(--tccb-medio); opacity: .85; }
.tccb-bar--escuro .tccb-bar__input { color: #fff; }
.tccb-bar--escuro .tccb-bar__input::placeholder { color: rgba(255, 255, 255, .78); }
.tccb-bar__input::-webkit-search-cancel-button,
.tccb-bar__input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.tccb-bar button {
	font-family: var(--tccb-body);
	cursor: pointer;
	border: 0;
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
	line-height: 1;
}
.tccb-bar .tccb-bar__clear {
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 34px; height: 34px; padding: 0; border-radius: 50%;
	background: transparent; color: inherit; opacity: .55;
	transition: opacity .2s ease, background .2s ease;
}
.tccb-bar .tccb-bar__clear[hidden] { display: none; }
.tccb-bar .tccb-bar__clear:hover { opacity: 1; background: rgba(201, 168, 76, .14); }
.tccb-bar .tccb-bar__clear svg { width: 16px; height: 16px; }

.tccb-bar .tccb-bar__btn {
	position: relative;
	overflow: hidden;
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem; flex-shrink: 0;
	padding: .85rem 1.5rem;
	border-radius: 999px;
	background: var(--tccb-grad);
	color: #fff;
	font-size: .95rem;
	font-weight: 700;
	box-shadow: 0 4px 15px rgba(201, 168, 76, .4);
	transition: transform .3s ease, box-shadow .3s ease;
}
.tccb-bar .tccb-bar__btn svg { width: 17px; height: 17px; transition: transform .3s ease; }
.tccb-bar .tccb-bar__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(201, 168, 76, .5); }
.tccb-bar .tccb-bar__btn:hover svg { transform: translateX(3px); }
.tccb-bar .tccb-bar__btn::after {
	content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
	background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,.55), rgba(255,255,255,0));
	transform: skewX(-25deg); transition: left .6s ease-in-out;
}
.tccb-bar .tccb-bar__btn:hover::after { left: 200%; }

/* Tamanhos */
.tccb-bar--compacto { max-width: 340px; padding: .25rem .25rem .25rem .9rem; }
.tccb-bar--compacto .tccb-bar__input { padding: .55rem .3rem; font-size: .9rem; }
.tccb-bar--compacto .tccb-bar__btn { padding: .6rem; width: 38px; height: 38px; }
.tccb-bar--compacto .tccb-bar__btn-text { display: none; }
.tccb-bar--compacto svg { width: 17px; height: 17px; }

.tccb-bar--grande { max-width: 820px; padding: .5rem .5rem .5rem 1.4rem; }
.tccb-bar--grande .tccb-bar__input { padding: 1rem .5rem; font-size: 1.1rem; }
.tccb-bar--grande .tccb-bar__btn { padding: 1rem 1.9rem; font-size: 1rem; }
.tccb-bar--grande .tccb-bar__icon svg { width: 22px; height: 22px; }

/* Sugestões ao vivo */
.tccb-suggest {
	position: absolute;
	top: calc(100% + 10px);
	left: 0; right: 0;
	padding: .5rem;
	border-radius: 20px;
	background: rgba(255, 255, 255, .9);
	-webkit-backdrop-filter: blur(22px) saturate(170%);
	backdrop-filter: blur(22px) saturate(170%);
	border: 1px solid rgba(201, 168, 76, .25);
	box-shadow: 0 22px 60px rgba(61, 53, 48, .16);
	color: var(--tccb-texto);
	text-align: left;
	max-height: min(70vh, 480px);
	overflow-y: auto;
	animation: tccbDrop .22s ease;
}
.tccb-suggest[hidden] { display: none; }
@keyframes tccbDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.tccb-suggest__item {
	display: flex; align-items: center; gap: .85rem;
	padding: .6rem .7rem;
	border-radius: 12px;
	text-decoration: none !important;
	color: var(--tccb-texto) !important;
	transition: background .18s ease;
}
.tccb-suggest__item:hover,
.tccb-suggest__item.is-active { background: var(--tccb-creme); }
.tccb-suggest__thumb {
	width: 46px; height: 46px; flex-shrink: 0; border-radius: 10px;
	background: var(--tccb-creme) center / cover no-repeat;
	display: flex; align-items: center; justify-content: center;
}
.tccb-suggest__thumb svg { width: 18px; height: 18px; stroke: var(--tccb-dourado-escuro); fill: none; stroke-width: 2; }
.tccb-suggest__info { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.tccb-suggest__title {
	font-size: .93rem; font-weight: 600; line-height: 1.35;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tccb-suggest__assunto {
	font-size: .72rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
	color: var(--tccb-dourado-escuro);
}
.tccb-suggest mark { background: none; color: var(--tccb-vinho); font-weight: 700; padding: 0; }
.tccb-suggest__all {
	display: flex; align-items: center; justify-content: center; gap: .5rem;
	margin-top: .35rem; padding: .8rem;
	border-top: 1px solid var(--tccb-borda);
	font-size: .88rem; font-weight: 700;
	color: var(--tccb-dourado-escuro) !important;
	text-decoration: none !important;
	border-radius: 0 0 14px 14px;
}
.tccb-suggest__all:hover,
.tccb-suggest__all.is-active { background: var(--tccb-branco-quente); }
.tccb-suggest__all svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.tccb-suggest__msg { padding: 1rem; font-size: .9rem; color: var(--tccb-medio); text-align: center; }

/* ==========================================================================
   PÁGINA DE RESULTADOS
   ========================================================================== */
.tccb-results {
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 5rem) 1.5rem;
	line-height: 1.7;
}

.tccb-results__head { text-align: center; margin-bottom: 2.5rem; position: relative; z-index: 60; }
.tccb-eyebrow {
	display: inline-block; margin-bottom: .9rem;
	font-size: .8rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
	color: var(--tccb-dourado-escuro);
}
.tccb-results .tccb-results__title {
	margin: 0 0 .6rem;
	font-family: var(--tccb-title);
	font-size: clamp(1.9rem, 3.6vw, 2.8rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--tccb-texto);
}
.tccb-results__title em {
	font-family: var(--tccb-accent);
	font-style: italic;
	font-weight: 600;
	color: var(--tccb-dourado-escuro);
}
.tccb-results__count { margin: 0 0 1.8rem; color: var(--tccb-medio); font-size: 1.02rem; }
.tccb-results__bar { margin-top: 1.6rem; }

/* Chips de filtro */
.tccb-chips {
	display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem;
	margin: 0 auto 3rem;
}
.tccb-results .tccb-chip {
	display: inline-flex; align-items: center; gap: .5rem;
	padding: .55rem 1.05rem;
	border: 1px solid var(--tccb-borda);
	border-radius: 999px;
	background: var(--tccb-branco);
	color: var(--tccb-texto);
	font-family: var(--tccb-body);
	font-size: .88rem; font-weight: 600; line-height: 1.2;
	text-transform: none; letter-spacing: normal;
	text-decoration: none;
	cursor: pointer;
	transition: all .25s ease;
}
.tccb-results .tccb-chip span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
	background: var(--tccb-creme); color: var(--tccb-dourado-escuro);
	font-size: .75rem; font-weight: 700;
}
.tccb-results .tccb-chip:hover { border-color: var(--tccb-dourado); color: var(--tccb-dourado-escuro); }
.tccb-results .tccb-chip.is-active {
	background: var(--tccb-grad); border-color: transparent; color: #fff;
	box-shadow: 0 4px 15px rgba(201, 168, 76, .35);
}
.tccb-results .tccb-chip.is-active span { background: rgba(255, 255, 255, .25); color: #fff; }

/* Grupos por assunto */
.tccb-group { margin-bottom: 3.5rem; animation: tccbFade .5s ease both; }
.tccb-group[hidden] { display: none; }
@keyframes tccbFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.tccb-group__head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
	margin-bottom: 1.5rem; padding-bottom: .9rem;
	border-bottom: 1px solid var(--tccb-borda);
	position: relative;
}
.tccb-group__head::after {
	content: ''; position: absolute; left: 0; bottom: -1px;
	width: 60px; height: 3px; border-radius: 2px; background: var(--tccb-grad);
}
.tccb-results .tccb-group__title {
	margin: 0;
	font-family: var(--tccb-title);
	font-size: clamp(1.35rem, 2.2vw, 1.7rem);
	font-weight: 700;
	color: var(--tccb-texto);
	line-height: 1.25;
}
.tccb-group__count { font-size: .9rem; font-weight: 600; color: var(--tccb-dourado-escuro); }

.tccb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.6rem;
}

/* Card */
.tccb-card {
	position: relative;
	border-radius: 16px;
	background: var(--tccb-branco);
	border: 1px solid var(--tccb-borda);
	box-shadow: 0 8px 26px var(--tccb-sombra);
	overflow: hidden;
	transition: transform .3s ease, box-shadow .3s ease;
}
.tccb-card[hidden] { display: none; }
.tccb-card::before {
	content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 2;
	background: var(--tccb-grad); transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.tccb-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(201, 168, 76, .22); }
.tccb-card:hover::before { transform: scaleX(1); }
.tccb-card.is-revealed { animation: tccbFade .45s ease both; }

.tccb-card__link {
	display: flex; flex-direction: column; height: 100%;
	color: inherit !important; text-decoration: none !important;
}
.tccb-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--tccb-creme), var(--tccb-vinho-claro));
	overflow: hidden;
}
.tccb-card__media img {
	position: relative; z-index: 1;
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: transform .6s ease;
}
.tccb-card:hover .tccb-card__media img { transform: scale(1.05); }
.tccb-card__placeholder {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.tccb-card__placeholder svg { width: 38px; height: 38px; stroke: var(--tccb-dourado); fill: none; stroke-width: 1.5; }
.tccb-card__tag {
	position: absolute; left: .9rem; bottom: .9rem; z-index: 2;
	padding: .35rem .8rem; border-radius: 999px;
	background: rgba(255, 255, 255, .78);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, .6);
	font-size: .7rem; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
	color: var(--tccb-vinho-escuro);
}
.tccb-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.5rem 1.4rem; }
.tccb-results .tccb-card__title {
	margin: 0 0 .7rem;
	font-family: var(--tccb-title);
	font-size: 1.18rem; font-weight: 700; line-height: 1.32;
	color: var(--tccb-texto);
}
.tccb-results .tccb-card__text {
	margin: 0 0 1.3rem;
	font-size: .93rem; line-height: 1.65;
	color: var(--tccb-medio);
	text-align: left;
}
.tccb-results mark {
	background: linear-gradient(transparent 58%, rgba(232, 201, 122, .55) 58%);
	color: inherit; padding: 0 1px; border-radius: 2px;
}
.tccb-card__more {
	margin-top: auto;
	display: inline-flex; align-items: center; gap: .45rem;
	font-size: .88rem; font-weight: 700; color: var(--tccb-dourado-escuro);
}
.tccb-card__more svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .3s ease; }
.tccb-card:hover .tccb-card__more svg { transform: translateX(4px); }

/* Ver mais */
.tccb-more-wrap { text-align: center; margin-top: 1.8rem; }
.tccb-results .tccb-more,
.tccb-results .tccb-topic__all {
	display: inline-flex; align-items: center; justify-content: center;
	padding: .8rem 1.8rem;
	border: 2px solid var(--tccb-dourado-escuro);
	border-radius: 7px;
	background: transparent;
	color: var(--tccb-dourado-escuro);
	font-family: var(--tccb-body);
	font-size: .92rem; font-weight: 700; line-height: 1.2;
	text-transform: none; letter-spacing: normal;
	cursor: pointer;
	transition: all .3s ease;
}
.tccb-results .tccb-more:hover,
.tccb-results .tccb-topic__all:hover {
	background: var(--tccb-grad); border-color: transparent; color: #fff;
	box-shadow: 0 8px 22px rgba(201, 168, 76, .35);
}

/* Nenhum resultado */
.tccb-empty {
	max-width: 640px; margin: 0 auto 3.5rem; padding: 3rem 2rem;
	text-align: center;
	border-radius: 20px;
	background: var(--tccb-branco-quente);
	border: 1px solid var(--tccb-borda);
}
.tccb-empty__icon {
	width: 64px; height: 64px; margin: 0 auto 1.2rem; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--tccb-creme);
}
.tccb-empty__icon svg { width: 26px; height: 26px; stroke: var(--tccb-dourado-escuro); fill: none; stroke-width: 2; stroke-linecap: round; }
.tccb-results .tccb-empty h2 {
	margin: 0 0 .6rem; font-family: var(--tccb-title); font-size: 1.45rem; color: var(--tccb-texto); line-height: 1.3;
}
.tccb-results .tccb-empty p { margin: 0 0 1.5rem; color: var(--tccb-medio); }

.tccb-popular {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem;
	margin: 0 auto 2.5rem;
}
.tccb-popular > span { font-size: .88rem; font-weight: 600; color: var(--tccb-medio); margin-right: .25rem; }
.tccb-empty .tccb-popular { margin-bottom: 0; }

/* Explorar por assunto */
.tccb-browse { margin-top: 1rem; }
.tccb-results .tccb-browse__title {
	text-align: center; margin: 0 0 2rem;
	font-family: var(--tccb-title); font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--tccb-texto);
}
.tccb-browse__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
	align-items: start;
}
.tccb-topic {
	padding: 1.8rem;
	border-radius: 16px;
	background: var(--tccb-branco-quente);
	border: 1px solid var(--tccb-borda);
	transition: box-shadow .3s ease, background .3s ease;
}
.tccb-topic:hover { background: var(--tccb-branco); box-shadow: 0 14px 36px var(--tccb-sombra); }
.tccb-results .tccb-topic__title {
	display: flex; align-items: center; justify-content: space-between; gap: .8rem;
	margin: 0 0 1rem;
	font-family: var(--tccb-title); font-size: 1.15rem; line-height: 1.3; color: var(--tccb-texto);
}
.tccb-topic__title span {
	display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
	min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
	background: var(--tccb-creme); color: var(--tccb-dourado-escuro);
	font-family: var(--tccb-body); font-size: .78rem; font-weight: 700;
}
.tccb-results .tccb-topic__list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.tccb-topic__list li { margin: 0; padding: 0; border-top: 1px solid var(--tccb-borda); }
.tccb-topic__list li:first-child { border-top: 0; }
.tccb-topic__list li[hidden] { display: none; }
.tccb-topic__list a {
	display: block; padding: .6rem 0 .6rem .9rem; position: relative;
	font-size: .92rem; line-height: 1.45; color: var(--tccb-texto) !important; text-decoration: none !important;
	transition: color .2s ease, padding .2s ease;
}
.tccb-topic__list a::before {
	content: ''; position: absolute; left: 0; top: 1.1rem;
	width: 5px; height: 5px; border-radius: 50%; background: var(--tccb-dourado);
}
.tccb-topic__list a:hover { color: var(--tccb-dourado-escuro) !important; padding-left: 1.2rem; }
.tccb-results .tccb-topic__all { padding: .55rem 1.2rem; font-size: .85rem; }

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 768px) {
	.tccb-results { padding: 2.5rem 1rem; }
	.tccb-chips {
		flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
		margin: 0 -1rem 2.5rem; padding: .2rem 1rem .6rem;
		scrollbar-width: none; -webkit-overflow-scrolling: touch;
	}
	.tccb-chips::-webkit-scrollbar { display: none; }
	.tccb-results .tccb-chip { flex-shrink: 0; }
	.tccb-grid { grid-template-columns: 1fr; gap: 1.2rem; }
	.tccb-browse__grid { grid-template-columns: 1fr; }
	.tccb-bar--grande .tccb-bar__input { font-size: 1rem; padding: .8rem .35rem; }
}
@media (max-width: 520px) {
	.tccb-bar { padding-left: .9rem; }
	.tccb-bar .tccb-bar__btn,
	.tccb-bar--grande .tccb-bar__btn { width: 46px; height: 46px; padding: 0; }
	.tccb-bar .tccb-bar__btn-text { display: none; }
	.tccb-bar--grande { padding-left: 1rem; }
	.tccb-suggest { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.tccb-bar *, .tccb-results * { animation: none !important; transition: none !important; }
}
