/* Página de favoritos — cards com mapa satélite, adicionar, CTA Pro, locked. */

.wv-favs { --wv-red: #fe0000; font-family: inherit; color: #1a1e2a; }

.wv-favs__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.wv-favs__title { font-size: 26px; font-weight: 800; margin: 0; display: inline-flex; align-items: center; gap: 10px; }
.wv-favs__live { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; color: var(--wv-red); text-transform: lowercase; }
.wv-favs__live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wv-red); box-shadow: 0 0 0 0 rgba(254,0,0,.5); animation: wvFavPulse 1.6s infinite; }
@keyframes wvFavPulse { 0% { box-shadow: 0 0 0 0 rgba(254,0,0,.5); } 70% { box-shadow: 0 0 0 6px rgba(254,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(254,0,0,0); } }

.wv-favs__reorder {
	display: inline-flex; align-items: center; gap: 6px;
	background: #fff !important; color: #374151 !important;
	border: 1.5px solid #e5e7eb !important; border-radius: 999px !important;
	padding: 9px 16px !important; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: none !important;
}
.wv-favs__reorder:hover { border-color: #d1d5db !important; }

/* grid */
.wv-favs__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-items: stretch; }
.wv-favs__grid.is-reordering .wv-favs__card { cursor: grab; }

/* card */
.wv-favs__card {
	position: relative; display: flex; flex-direction: column;
	border: 1px solid #eceef2; border-radius: 18px; overflow: hidden; background: #fff;
	box-shadow: 0 6px 20px rgba(0,0,0,.05);
}
.wv-favs__card.is-main { border-color: var(--wv-red); }
.wv-favs__map { height: 150px; width: 100%; background: #dfe6ea; }
.wv-favs__map.is-nomap { background: linear-gradient(135deg,#cbd5e1,#94a3b8); }
.leaflet-container { background: #dfe6ea; }

.wv-favs__remove {
	position: absolute; top: 10px; right: 10px; z-index: 500;
	width: 30px !important; height: 30px !important; border-radius: 50% !important;
	border: 0 !important; background: rgba(0,0,0,.55) !important; color: #fff !important;
	font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 !important; box-shadow: none !important;
}
.wv-favs__remove:hover { background: var(--wv-red) !important; }

/* Coração de favoritar (cards de navegação nas páginas de condição): canto superior
   do mapa, redondo, vermelho Waves. Vazado por padrão; preenchido quando já favorito
   (.is-fav é alternado pelo app.js). !important pra vencer o kit do Elementor. */
.wv-favs__heart {
	position: absolute; top: 10px; right: 10px; z-index: 500;
	width: 40px !important; height: 40px !important; border-radius: 50% !important;
	border: 1.5px solid #e5e7eb !important; background: #fff !important; color: var(--wv-red) !important;
	display: grid !important; place-items: center; cursor: pointer; padding: 0 !important;
	box-shadow: 0 2px 8px rgba(0,0,0,.15) !important;
}
.wv-favs__heart svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; }
.wv-favs__heart:hover { border-color: var(--wv-red) !important; }
.wv-favs__heart.is-fav svg { fill: currentColor; stroke: currentColor; }
.wv-favs__heart.is-loading { opacity: .55; pointer-events: none; }

.wv-favs__body { padding: 16px 18px 18px; display: flex; flex-direction: column; }
.wv-favs__name { font-size: 18px; font-weight: 800; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.wv-favs__badge-main { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--wv-red); border-radius: 999px; padding: 2px 8px; }
.wv-favs__loc { color: #9ca3af; font-size: 13px; margin: 0 0 14px; }

.wv-favs__cond { display: grid; grid-template-columns: auto auto auto; gap: 16px; margin-bottom: 16px; }
.wv-favs__cond-col { display: flex; flex-direction: column; gap: 3px; }
.wv-favs__cond-lbl { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #9ca3af; }
.wv-favs__cond-val { font-size: 15px; font-weight: 800; color: #1a1e2a; display: inline-flex; align-items: center; gap: 5px; }
.wv-favs__cond-col--surf .wv-favs__cond-val { font-size: 18px; }
.wv-favs__score { display: inline-flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 800; margin-top: 2px; color: #1a1e2a; }
.wv-favs__score-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.wv-favs__dir-ic { display: block; width: 32px; height: 32px; }
/* Seta do rumo dentro de quadrado arredondado + texto em 2 linhas (SWELL cinza, VENTO vermelho).
   Tamanhos compactos pra caber 3 colunas mesmo no card estreito (grid minmax 260px). */
.wv-favs__cond { grid-template-columns: auto auto auto; gap: 10px; }
.wv-favs__cond-col--surf .wv-favs__cond-val { font-size: 18px; }
.wv-favs__cond-val--dir { display: inline-flex; align-items: center; gap: 6px; }
.wv-favs__dir { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.wv-favs__dir--swell { background: #eef1f5; }
/* Vento: mesma escala do detalhe do pico (waves-forecast *-soft):
   terral (offshore) verde, cruzado (cross) amarelo, maral (onshore) vermelho. */
.wv-favs__dir--wind-t { background: rgba(34, 197, 94, 0.55); }
.wv-favs__dir--wind-c { background: rgba(250, 204, 21, 0.55); }
.wv-favs__dir--wind-m { background: rgba(239, 68, 68, 0.55); }
.wv-favs__dir-txt { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.wv-favs__dir-txt strong { font-size: 17px; font-weight: 800; color: #1a1e2a; }
.wv-favs__dir-txt small { font-size: 15px; font-weight: 700; color: #6b7280; }

.wv-favs__btn {
	margin-top: auto; display: block; text-align: center; text-decoration: none;
	background: var(--wv-red); color: #fff; font-weight: 800; font-size: 14px;
	border-radius: 999px; padding: 12px 18px;
}
.wv-favs__btn:hover { filter: brightness(.96); color: #fff; }

/* caixa "adicionar" (+) */
.wv-favs__add {
	display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	min-height: 260px; border: 2px dashed #d8dde5 !important; border-radius: 18px !important;
	background: #fff !important; cursor: pointer; text-align: center; padding: 24px; box-shadow: none !important;
	transition: border-color .15s, background .15s;
}
.wv-favs__add:hover { border-color: var(--wv-red) !important; background: #fff7f7 !important; }
.wv-favs__add-plus {
	width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
	background: #fff0f0; color: var(--wv-red); font-size: 28px; font-weight: 400; line-height: 1;
}
.wv-favs__add-title { font-size: 15px; font-weight: 800; color: #1a1e2a; }
.wv-favs__add-sub { font-size: 13px; color: #9ca3af; }

/* CTA "Seja Pro" (Free no limite) */
.wv-favs__cta {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	min-height: 260px; border: 2px solid var(--wv-red); border-radius: 18px; background: #fff5f5;
	text-align: center; padding: 24px;
}
.wv-favs__cta-logo { height: 22px; width: auto; margin-bottom: 4px; }
.wv-favs__cta-title { font-size: 16px; font-weight: 800; margin: 0; }
.wv-favs__cta-text { font-size: 13px; color: #6b7280; margin: 0; line-height: 1.5; }
.wv-favs__cta-btn {
	margin-top: 6px; background: var(--wv-red); color: #fff; font-weight: 800; font-size: 14px;
	border-radius: 999px; padding: 11px 26px; text-decoration: none;
}
.wv-favs__cta-btn:hover { filter: brightness(.96); color: #fff; }

/* pico bloqueado (expirado >3) */
.wv-favs__card.is-locked .wv-favs__map,
.wv-favs__card.is-locked .wv-favs__body { opacity: .45; filter: grayscale(.3); }
.wv-favs__card.is-locked { border-style: dashed; }
.wv-favs__lock {
	position: absolute; inset: 0; z-index: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	background: rgba(255,255,255,.72); text-align: center; padding: 20px;
}
.wv-favs__lock-ic { font-size: 26px; }
.wv-favs__lock-txt { font-size: 14px; font-weight: 700; color: #1a1e2a; margin: 0; max-width: 220px; }
.wv-favs__lock-btn { background: var(--wv-red); color: #fff; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 9px 22px; text-decoration: none; }
.wv-favs__lock-btn:hover { filter: brightness(.96); color: #fff; }

/* lightbox de escolher pico */
.wv-favs-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wv-favs-modal__box { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 460px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); max-height: 82vh; display: flex; flex-direction: column; }
.wv-favs-modal__close { position: absolute; top: 12px; right: 14px; border: 0 !important; background: none !important; box-shadow: none !important; font-size: 26px; line-height: 1; cursor: pointer; color: #9ca3af !important; }
.wv-favs-modal__title { font-size: 19px; font-weight: 800; margin: 0 0 14px; }
.wv-favs-modal__search { position: relative; display: flex; align-items: center; }
.wv-favs-modal__search svg { position: absolute; right: 16px; color: #9ca3af; pointer-events: none; }
.wv-favs-modal__search input { width: 100%; height: 50px; box-sizing: border-box; padding: 0 46px 0 16px; border: 1.5px solid #e5e7eb; border-radius: 999px; font-size: 15px; }
.wv-favs-modal__search input:focus { outline: none; border-color: var(--wv-red); }
.wv-favs-modal__results { margin-top: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.wv-favs-modal__hint { color: #9ca3af; font-size: 14px; padding: 12px 4px; margin: 0; }
/* color !important mata o rosa que o kit do Elementor injeta no <button>. */
.wv-favs-modal__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid #eceef2 !important; border-radius: 12px !important; background: #fff !important; color: #1a1e2a !important; cursor: pointer; box-shadow: none !important; }
/* Selecionado/hover: vermelho Waves + fonte branca (sem rosa). Já-favoritado não reage. */
.wv-favs-modal__row:not(.is-fav):hover,
.wv-favs-modal__row.is-selected {
	border-color: #fe0000 !important; background: #fe0000 !important;
}
.wv-favs-modal__row:not(.is-fav):hover span strong,
.wv-favs-modal__row.is-selected span strong,
.wv-favs-modal__row:not(.is-fav):hover span small,
.wv-favs-modal__row.is-selected span small { color: #fff !important; }
.wv-favs-modal__row:not(.is-fav):hover .wv-favs-modal__plus,
.wv-favs-modal__row.is-selected .wv-favs-modal__plus { background: rgba(255,255,255,.22); color: #fff; }
.wv-favs-modal__row span strong { display: block; font-size: 15px; color: #fe0000; }
.wv-favs-modal__row span small { display: block; color: #9ca3af; font-size: 12px; }
.wv-favs-modal__plus { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(254,0,0,.10); color: #fe0000; font-weight: 700; font-size: 18px; }
/* Já favoritado: coração vermelho preenchido, sem ação (não remove aqui). */
.wv-favs-modal__row.is-fav { cursor: default; opacity: 1 !important; }
.wv-favs-modal__done { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; }
.wv-favs-modal__heart { display: block; fill: #fe0000; }

/* Processando (favoritando): trava a lista + busca, escurece as outras linhas,
   spinner na linha clicada — evita cliques repetidos durante o request+reload. */
.wv-favs-modal.is-busy { cursor: wait; }
.wv-favs-modal.is-busy .wv-favs-modal__results,
.wv-favs-modal.is-busy .wv-favs-modal__search { pointer-events: none; }
.wv-favs-modal.is-busy .wv-favs-modal__row:not(.is-loading) { opacity: .5; }
.wv-favs-modal__row.is-loading .wv-favs-modal__plus { color: transparent !important; position: relative; }
.wv-favs-modal__row.is-loading .wv-favs-modal__plus::after {
	content: ""; position: absolute; top: 50%; left: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px;
	border-radius: 50%; border: 2px solid rgba(254,0,0,.25); border-top-color: #fe0000;
	animation: wv-favs-spin .6s linear infinite;
}
@keyframes wv-favs-spin { to { transform: rotate(360deg); } }
.wv-favs-modal__err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 10px; }

@media (max-width: 560px) { .wv-favs__cond { gap: 10px; } }

.wv-favs__attr { color: #b6bcc7; font-size: 11px; margin: 14px 0 0; text-align: right; }

/* confirmação de remover favorito */
.wv-favs-confirm__box { max-width: 400px; }
.wv-favs-confirm__txt { font-size: 15px; color: #374151; margin: 0 0 20px; line-height: 1.5; }
.wv-favs-confirm__actions { display: flex; gap: 10px; justify-content: flex-end; }
.wv-favs-confirm__cancel { background: #fff !important; color: #374151 !important; border: 1.5px solid #e5e7eb !important; border-radius: 10px !important; padding: 10px 18px; font-weight: 700; cursor: pointer; box-shadow: none !important; }
.wv-favs-confirm__ok { background: #fe0000 !important; color: #fff !important; border: 0 !important; border-radius: 10px !important; padding: 10px 20px; font-weight: 800; cursor: pointer; box-shadow: none !important; }
.wv-favs-confirm__ok:hover { filter: brightness(.96); }

/* troféu: tornar principal (topo-esquerdo). Principal = âmbar preenchido. */
.wv-favs__main-btn {
	position: absolute; top: 10px; left: 10px; z-index: 500;
	width: 30px !important; height: 30px !important; border-radius: 50% !important;
	border: 0 !important; background: rgba(0,0,0,.55) !important; color: #fff !important;
	display: grid !important; place-items: center; cursor: pointer; padding: 0 !important; box-shadow: none !important;
}
.wv-favs__main-btn:hover { background: #f59e0b !important; }
.wv-favs__main-btn.is-main { background: #f59e0b !important; color: #fff !important; cursor: default; }

/* thumbnail de satélite pré-gerado (CDN) + pino na cor do score */
.wv-favs__map--img { position: relative; }
.wv-favs__map--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Pin de mapa (gota) na cor do score, com a ponta apontando o pico (centro da thumbnail). */
.wv-favs__pin { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -100%); line-height: 0; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.wv-favs__pin svg { display: block; }
