/* ==========================================================================
   Modal de Busca - Mobile
   ========================================================================== */

/* Botão de busca mobile */
.mobile-search-toggle {
	display: none;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: #333;
	transition: color 0.2s ease;
}

.mobile-search-toggle:hover {
	color: #E42B26;
}

.mobile-search-toggle svg {
	display: block;
}

/* Modal overlay */
.search-modal-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	z-index: 99999;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.search-modal-overlay.is-open {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 60px;
}

.search-modal-overlay.is-visible {
	opacity: 1;
}

/* Container do modal */
.search-modal {
	background: #fff;
	width: 90%;
	max-width: 600px;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	transform: translateY(-20px);
	transition: transform 0.3s ease;
	overflow: hidden;
}

.search-modal-overlay.is-visible .search-modal {
	transform: translateY(0);
}

/* Header do modal */
.search-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #eee;
}

.search-modal-title {
	font-size: 16px;
	font-weight: 700;
	color: #333;
	margin: 0;
}

.search-modal-close {
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: #666;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.search-modal-close:hover {
	background: #f5f5f5;
	color: #E42B26;
}

/* Formulário de busca */
.search-modal-form {
	padding: 20px;
}

.search-modal-input-wrapper {
	position: relative;
}

.search-modal-input {
	width: 100%;
	padding: 14px 50px 14px 16px;
	font-size: 16px;
	border: 2px solid #ddd;
	border-radius: 6px;
	transition: border-color 0.2s ease;
}

.search-modal-input:focus {
	outline: none;
	border-color: #E42B26;
}

.search-modal-input::placeholder {
	color: #999;
}

.search-modal-submit {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: #E42B26;
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.2s ease;
}

.search-modal-submit:hover {
	background: #c91f1a;
}

/* Sugestões de busca (opcional) */
.search-modal-suggestions {
	padding: 0 20px 20px;
}

.search-modal-suggestions-title {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #999;
	margin: 0 0 12px;
	letter-spacing: 0.05em;
}

.search-modal-suggestions-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.search-modal-suggestion-item {
	margin: 0;
	padding: 0;
}

.search-modal-suggestion-link {
	display: block;
	padding: 10px 12px;
	color: #333;
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.2s ease;
	font-size: 14px;
}

.search-modal-suggestion-link:hover {
	background: #f5f5f5;
	color: #E42B26;
}

/* Mobile específico */
@media (max-width: 782px) {
	.mobile-search-toggle {
		display: block;
	}
	
	.search-modal-overlay.is-open {
		padding-top: 40px;
	}
	
	.search-modal {
		width: 95%;
	}
	
	.search-modal-input {
		font-size: 16px; /* Previne zoom no iOS */
	}
}

/* Desktop - esconde o botão mobile */
@media (min-width: 783px) {
	.mobile-search-toggle {
		display: none !important;
	}
}

/* Prevenir scroll do body quando modal aberto */
body.search-modal-open {
	overflow: hidden;
}
