/*
Theme Name: Top Game Brasil
Theme URI: 
Author: Itamar Silva
Author URI: itamarsilva.eti.br
Description: 
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfour
Text Domain: top-game-brasil
Tags: 
*/

/* Main Menu */
.header-transparent{
	position:absolute;
	width:100%;z-index:9999;
}

header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content{
	position: relative;
}

header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content:focus,
header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content:active{
	outline-width: 0;
  	outline-style: none;
}

header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content::after{
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: transparent;
	position: absolute;
	left: 0;
	bottom: -15px;
	transition: all 250ms linear;
}

header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content:hover::after,
header.wp-block-template-part .wp-block-navigation .current-menu-item .wp-block-navigation-item__content::after{
	background-color: #ffd700;
	left: 50%;
	transform: translateX(-50%);
}

@media screen and (max-width: 767px) {
	.header-links-row{
		flex-flow: row-reverse;
	}

	header.wp-block-template-part .wp-block-navigation__responsive-container-open{
		background-color: #ff6347;
		padding: .37em;
		border-radius: 50%;
		color: #2c3e50;
	}

	header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content{
		font-size: 1.5rem;
		font-weight: 500;
	}

	header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content:hover::after,
	header.wp-block-template-part .wp-block-navigation .current-menu-item .wp-block-navigation-item__content::after{
		bottom: auto;
		top: 50%;
		left: -20px;
		transform: translate( 0, -50% );
	}
}

/* Forms */
form{
	text-align: center;
}

select,
textarea,
input[type="text"],
input[type="email"],
input[type="tel"]{
	border-radius: 26px;
	border: none;
	background-color: #fff9e0;
	padding: .75rem 1rem;
	width: 100%;
}

input[type="button"],
input[type="submit"],
input[type="reset"]{
	border-radius: 26px;
	font-weight: 500;
	font-family: inherit;
	padding: .75rem 1.5rem;
	background-color: #ffd700;
	width: auto;
	border: none;
	color: #ffffff;
	cursor: pointer;
}

.wp-block-categories select{
	border: 1px solid #949494;
}

/* Pagination */
.wp-block-query-pagination-numbers {
	display: flex;
  	gap: 1em;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-block;
	padding: .25em;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	text-align: center;
}

.wp-block-query-pagination-numbers .page-numbers:not(.current, .dots) {
	border: 1px solid #ff6347;
}

.wp-block-query-pagination-numbers .page-numbers:not(.current, .dots):hover{
	background-color: #ff6347;
}

/* Categories List */
.wp-block-categories-list .cat-item.current-cat a{
	color: #2c3e50;
	display: inline-block;
  	position: relative;
}

.wp-block-categories-list .cat-item.current-cat a::after{
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #ffd700;
	position: absolute;
	left: -1.25em;
	top: 50%;
	transform: translateY(-50%);
	transition: all 250ms linear;
}

/* Maps */
/* 
 * Always set the map height explicitly to define the size of the div element
 * that contains the map. 
 */
 #map {
	height: 400px;
  }

/* Blog listing: keep generated 1200x630 covers in their native ratio. */
body.page-id-2768 .elementor-2772 .elementor-element.elementor-element-8e9095a {
	--min-height: 0px;
	aspect-ratio: 1200 / 630;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Blog category archives: prevent Elementor fit-height from cropping covers. */
body.archive.category .elementor-post__thumbnail.elementor-fit-height {
	padding-bottom: 52.5% !important;
}

body.archive.category .elementor-post__thumbnail.elementor-fit-height img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translate(-50%, -50%);
}

/* ==========================================================================
   Busca de produtos - campo + sugestoes instantaneas + pagina de resultados
   Usado em templates/archive-product.html e templates/product-search-results.html
   via parts/product-search.html. JS: assets/js/product-search.js
   ========================================================================== */

.tg-search {
	position: relative;
	z-index: 30;
	margin-left: auto;
	margin-right: auto;
}

.tg-search .wp-block-search__label {
	display: none;
}

.tg-search .wp-block-search__inside-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 7px 7px 52px;
	background: #ffffff;
	border: 2px solid rgba(124, 31, 103, 0.16);
	border-radius: 999px;
	box-shadow: 0 10px 30px rgba(44, 62, 80, 0.10);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Lupa desenhada no proprio wrapper, para nao depender de icone do bloco. */
.tg-search .wp-block-search__inside-wrapper::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 50%;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c1f67' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E")
		no-repeat center / contain;
	pointer-events: none;
	opacity: 0.75;
}

.tg-search .wp-block-search__inside-wrapper:focus-within {
	border-color: #7c1f67;
	box-shadow: 0 0 0 4px rgba(124, 31, 103, 0.12), 0 14px 34px rgba(44, 62, 80, 0.14);
}

.tg-search .wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.55rem 0.25rem;
	border: 0;
	background: transparent;
	font-family: var(--wp--preset--font-family--nunito, inherit);
	font-size: 1.05rem;
	font-weight: 600;
	color: #2c3e50;
}

.tg-search .wp-block-search__input:focus {
	outline: 0;
}

.tg-search .wp-block-search__input::placeholder {
	color: rgba(44, 62, 80, 0.48);
	font-weight: 500;
}

.tg-search .wp-block-search__button {
	flex: 0 0 auto;
	margin: 0;
	padding: 0.8rem 1.9rem;
	border: 0;
	border-radius: 999px;
	background: #ff6347;
	color: #ffffff;
	font-family: var(--wp--preset--font-family--nunito, inherit);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(255, 99, 71, 0.38);
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-search .wp-block-search__button:hover,
.tg-search .wp-block-search__button:focus {
	background: #ffa500;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(255, 165, 0, 0.45);
}

/* -------- Painel de sugestoes -------- */

.tg-search__panel {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	right: 0;
	max-height: min(72vh, 540px);
	overflow-y: auto;
	background: #ffffff;
	border: 1px solid rgba(124, 31, 103, 0.14);
	border-radius: 20px;
	box-shadow: 0 22px 50px rgba(44, 62, 80, 0.20);
	overflow-x: hidden;
	z-index: 40;
}

.tg-search__panel[hidden] {
	display: none;
}

.tg-search__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 16px;
	border-bottom: 1px solid rgba(44, 62, 80, 0.07);
	text-decoration: none;
	color: #2c3e50;
	transition: background-color 0.15s ease;
}

.tg-search__item:last-of-type {
	border-bottom: 0;
}

.tg-search__item.is-active,
.tg-search__item:hover {
	background: #fff9e0;
}

.tg-search__thumb {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	object-fit: contain;
	border-radius: 12px;
	background: #fff9e0;
}

.tg-search__thumb--empty {
	display: block;
	background: rgba(124, 31, 103, 0.08);
}

.tg-search__name {
	font-family: var(--wp--preset--font-family--nunito, inherit);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	color: #2c3e50;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tg-search__mark {
	background: transparent;
	color: #7c1f67;
	font-weight: 800;
}

/* Grudado no rodape do painel: o CTA principal nunca pode ficar escondido
   abaixo da rolagem da lista de sugestoes. */
.tg-search__all {
	position: sticky;
	bottom: 0;
	display: block;
	padding: 14px 16px;
	background: #7c1f67;
	color: #ffffff;
	font-family: var(--wp--preset--font-family--nunito, inherit);
	font-size: 0.95rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.tg-search__all.is-active,
.tg-search__all:hover {
	background: #ff6347;
	color: #ffffff;
}

.tg-search__message {
	margin: 0;
	padding: 20px 16px;
	text-align: center;
	font-family: var(--wp--preset--font-family--nunito, inherit);
	font-size: 0.95rem;
	font-weight: 600;
	color: rgba(44, 62, 80, 0.7);
}

.tg-search__message--loading::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 10px;
	vertical-align: -2px;
	border: 2px solid rgba(124, 31, 103, 0.25);
	border-top-color: #7c1f67;
	border-radius: 50%;
	animation: tg-search-spin 0.7s linear infinite;
}

@keyframes tg-search-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tg-search .wp-block-search__button,
	.tg-search__item,
	.tg-search__all {
		transition: none;
	}

	.tg-search__message--loading::after {
		animation: none;
	}
}

/* -------- Pagina de resultados -------- */

.tg-results-bar {
	font-family: var(--wp--preset--font-family--nunito, inherit);
	font-weight: 600;
	color: rgba(44, 62, 80, 0.75);
}

.tg-results-bar .woocommerce-result-count {
	margin: 0;
	font-size: 1rem;
}

.tg-results-reset a {
	display: inline-block;
	padding: 0.5rem 1.2rem;
	border: 2px solid rgba(124, 31, 103, 0.25);
	border-radius: 999px;
	color: #7c1f67;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tg-results-reset a:hover,
.tg-results-reset a:focus {
	background: #7c1f67;
	border-color: #7c1f67;
	color: #ffffff;
}

.tg-empty {
	border: 2px dashed rgba(124, 31, 103, 0.22);
	border-radius: 20px;
	background: #ffffff;
}

/* O corpo do site herda a cor de link (#3498db); num aviso que precisa ser
   lido, usa a cor de texto da paleta. */
.tg-empty p {
	color: #2c3e50;
}

/* Mesmo motivo do `base-2` ausente: o botao cheio precisa do rotulo branco. */
.tg-empty .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	color: #ffffff;
}

/* Correcao de legibilidade nos cards de produto: o bloco "Ver mais" pede a cor
   `base-2`, que nao existe na paleta deste tema - sem ela o rotulo caia para o
   azul de link herdado, ficando azul sobre laranja. */
.wp-block-query .wp-block-read-more {
	color: #ffffff;
}

.wp-block-query .wp-block-read-more:hover,
.wp-block-query .wp-block-read-more:focus {
	color: #ffffff;
	background-color: #ffa500;
}

/* -------- Mobile -------- */

@media (max-width: 600px) {
	.tg-search .wp-block-search__inside-wrapper {
		padding: 6px 6px 6px 44px;
	}

	.tg-search .wp-block-search__inside-wrapper::before {
		left: 16px;
		width: 18px;
		height: 18px;
	}

	.tg-search .wp-block-search__input {
		font-size: 1rem;
	}

	.tg-search .wp-block-search__button {
		padding: 0.7rem 1.15rem;
		font-size: 0.9rem;
	}

	.tg-search__thumb {
		width: 48px;
		height: 48px;
	}

	/* Painel mais baixo no celular para o rodape "Ver os N resultados"
	   continuar dentro da tela quando o teclado virtual estiver aberto. */
	.tg-search__panel {
		max-height: min(58vh, 420px);
	}
}
