/* LP Avaliações — frontend */
:root {
	--lpav-accent: #3483fa;
	--lpav-star: #3483fa;
	--lpav-text: #1f1f1f;
	--lpav-muted: #737373;
	--lpav-line: #e6e6e6;
	--lpav-soft: #f5f5f5;
	--lpav-ok: #00a650;
	--lpav-radius: 8px;
}

.lpav, .lpav-account, .lpav-box { color: var(--lpav-text); font-size: 15px; line-height: 1.5; }
.lpav *, .lpav-account *, .lpav-box * { box-sizing: border-box; }

/* Estrelas (exibição) */
.lpav-stars {
	position: relative; display: inline-block; vertical-align: middle;
	font-size: 15px; line-height: 1; letter-spacing: 2px; color: #d0d0d0;
}
.lpav-stars::before { content: "★★★★★"; }
.lpav-stars__fill {
	position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: var(--lpav-accent);
}
.lpav-stars__fill::before { content: "★★★★★"; }
.lpav-stars--lg { font-size: 22px; }

/* Cabeçalho / resumo */
.lpav__heading { font-size: 22px; font-weight: 600; margin: 0 0 20px; }
.lpav-summary {
	display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 32px; align-items: center;
	padding-bottom: 24px; border-bottom: 1px solid var(--lpav-line); margin-bottom: 24px;
}
.lpav-summary__score { display: flex; align-items: center; gap: 14px; }
.lpav-summary__avg { font-size: 56px; font-weight: 600; line-height: 1; color: var(--lpav-accent); }
.lpav-summary__count { display: block; color: var(--lpav-muted); font-size: 14px; margin-top: 4px; }

.lpav-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lpav-bar {
	all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
	display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 10px; font-size: 14px; color: var(--lpav-muted);
}
.lpav-bar:disabled { cursor: default; opacity: .6; }
.lpav-bar:not(:disabled):hover .lpav-bar__fill { filter: brightness(.9); }
.lpav-bar__track { height: 6px; background: var(--lpav-soft); border-radius: 99px; overflow: hidden; }
.lpav-bar__fill { display: block; height: 100%; background: var(--lpav-accent); border-radius: 99px; }
.lpav-bar__num { text-align: right; }

/* Galeria de fotos */
.lpav-gallery { margin-bottom: 24px; }
.lpav-gallery__title { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.lpav-gallery__strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.lpav-photo {
	all: unset; cursor: zoom-in; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 6px; overflow: hidden;
	background: var(--lpav-soft); scroll-snap-align: start;
}
.lpav-photo img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0 !important; }
.lpav-photo:focus-visible { outline: 2px solid var(--lpav-accent); outline-offset: 2px; }

/* Filtros */
.lpav-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.lpav-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lpav-chip {
	all: unset; cursor: pointer; padding: 6px 14px; border-radius: 99px; font-size: 14px;
	background: var(--lpav-soft); color: var(--lpav-text); transition: background .15s;
}
.lpav-chip:hover { background: #ebebeb; }
.lpav-chip.is-active { background: color-mix(in srgb, var(--lpav-accent) 14%, white); color: var(--lpav-accent); font-weight: 600; }
.lpav-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--lpav-muted); margin: 0; }
.lpav-sort select { padding: 6px 10px; border: 1px solid var(--lpav-line); border-radius: 6px; font-size: 14px; background: #fff; }

/* Lista */
.lpav-list { transition: opacity .2s; }
.lpav-list.is-loading { opacity: .4; pointer-events: none; }
.lpav-item { padding: 20px 0; border-bottom: 1px solid var(--lpav-line); }
.lpav-item__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lpav-item__date { font-size: 13px; color: var(--lpav-muted); }
.lpav-item__title { font-size: 15px; font-weight: 600; margin: 10px 0 0; }
.lpav-item__text { margin: 8px 0 0; white-space: normal; word-wrap: break-word; }
.lpav-item__photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lpav-item__photos .lpav-photo { width: 72px; height: 72px; }
.lpav-item__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; font-size: 13px; color: var(--lpav-muted); }
.lpav-item__author { font-weight: 600; color: var(--lpav-text); }
.lpav-verified { color: var(--lpav-ok); font-weight: 600; }
.lpav-source { color: var(--lpav-muted); }
.lpav-helpful {
	all: unset; cursor: pointer; margin-left: auto; padding: 5px 12px; border: 1px solid var(--lpav-line); border-radius: 99px;
	font-size: 13px; color: var(--lpav-muted); transition: all .15s;
}
.lpav-helpful:hover { border-color: var(--lpav-accent); color: var(--lpav-accent); }
.lpav-helpful.is-voted { border-color: var(--lpav-accent); color: var(--lpav-accent); background: color-mix(in srgb, var(--lpav-accent) 8%, white); cursor: default; }
.lpav-reply { margin-top: 12px; padding: 12px 14px; background: var(--lpav-soft); border-left: 3px solid var(--lpav-accent); border-radius: 0 6px 6px 0; font-size: 14px; }
.lpav-reply p { margin: 4px 0 0; }
.lpav-no-results, .lpav-empty { color: var(--lpav-muted); padding: 16px 0; }

.lpav-more {
	all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; text-align: center; margin-top: 16px;
	padding: 12px; border-radius: 6px; font-weight: 600; color: var(--lpav-accent);
	background: color-mix(in srgb, var(--lpav-accent) 10%, white);
}
.lpav-more:hover { background: color-mix(in srgb, var(--lpav-accent) 18%, white); }

.lpav-empty-state { text-align: center; padding: 32px 16px; background: var(--lpav-soft); border-radius: var(--lpav-radius); }
.lpav-empty-state p { margin: 8px 0 0; }

/* Lightbox */
.lpav-lightbox {
	position: fixed; inset: 0; z-index: 999999; background: rgba(0,0,0,.88);
	display: flex; align-items: center; justify-content: center; padding: 40px 56px;
}
.lpav-lightbox[hidden] { display: none; }
.lpav-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lpav-lightbox button {
	all: unset; cursor: pointer; position: absolute; color: #fff; font-size: 40px; line-height: 1;
	width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.lpav-lightbox button:hover { background: rgba(255,255,255,.12); }
.lpav-lightbox__close { top: 12px; right: 12px; }
.lpav-lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lpav-lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------------- Minha conta ---------------- */
.woocommerce-orders-table .button.lpav-avaliar,
.woocommerce-MyAccount-content .woocommerce-button.lpav-avaliar {
	background: var(--lpav-accent) !important; color: #fff !important; border-color: var(--lpav-accent) !important;
}
.lpav-section-title { font-size: 18px; margin: 8px 0 14px; }
.lpav-section-title + .lpav-empty { margin-top: -6px; }
.lpav-account .lpav-section-title:not(:first-child) { margin-top: 32px; }

.lpav-pending-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.lpav-pending-card {
	display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--lpav-line); border-radius: var(--lpav-radius);
	text-decoration: none !important; color: var(--lpav-text) !important; transition: box-shadow .15s;
}
.lpav-pending-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.lpav-pending-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin: 0 !important; }
.lpav-pending-card__name { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lpav-pending-card__meta { font-size: 12px; color: var(--lpav-muted); }
.lpav-pending-card__stars { color: #c8c8c8; letter-spacing: 2px; }

.lpav-btn {
	display: inline-block; padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 14px; text-align: center;
	background: var(--lpav-accent) !important; color: #fff !important; border: 0 !important; cursor: pointer; text-decoration: none !important;
}
.lpav-btn--block { display: block; margin-top: auto; }
.lpav-btn--primary { padding: 12px 24px; font-size: 15px; }

.lpav-my-reviews { list-style: none; margin: 0; padding: 0; }
.lpav-my-review { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--lpav-line); }
.lpav-my-review img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; margin: 0 !important; flex: 0 0 auto; }
.lpav-my-review p { margin: 6px 0 0; font-size: 14px; color: var(--lpav-muted); }

.lpav-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: middle; }
.lpav-badge--ok { background: #e6f7ee; color: #00753a; }
.lpav-badge--wait { background: #fff4e0; color: #9a5b00; }
.lpav-badge--no { background: #fdecec; color: #b42318; }

.lpav-order-head { color: var(--lpav-muted); margin-bottom: 18px; }
.lpav-review-card { border: 1px solid var(--lpav-line); border-radius: var(--lpav-radius); padding: 18px; margin-bottom: 18px; scroll-margin-top: 100px; }
.lpav-review-card:target { border-color: var(--lpav-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lpav-accent) 18%, transparent); }
.lpav-review-card__product { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.lpav-review-card__product img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; margin: 0 !important; }
.lpav-review-card__name { font-weight: 600; color: var(--lpav-text) !important; text-decoration: none !important; }
.lpav-review-card__variant { font-size: 13px; color: var(--lpav-muted); }
.lpav-done p { margin: 6px 0 0; }
.lpav-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.lpav-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; margin: 0 !important; }

.lpav-form .lpav-field { margin: 0 0 16px; border: 0; padding: 0; }
.lpav-form legend, .lpav-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.lpav-optional { font-weight: 400; color: var(--lpav-muted); }
.lpav-form input[type="text"], .lpav-form textarea {
	width: 100%; padding: 10px 12px; border: 1px solid #cfcfcf; border-radius: 6px; font-size: 15px; background: #fff;
}
.lpav-form input[type="text"]:focus, .lpav-form textarea:focus { border-color: var(--lpav-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lpav-accent) 18%, transparent); }

/* Seletor de estrelas */
.lpav-star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.lpav-star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.lpav-star-input label {
	font-size: 36px !important; line-height: 1; color: #d0d0d0; cursor: pointer; margin: 0 !important; font-weight: 400 !important; transition: color .1s, transform .1s;
}
.lpav-star-input label:hover,
.lpav-star-input label:hover ~ label,
.lpav-star-input input:checked ~ label { color: var(--lpav-accent); }
.lpav-star-input label:active { transform: scale(.9); }
.lpav-star-input input:focus-visible + label { outline: 2px solid var(--lpav-accent); outline-offset: 2px; border-radius: 4px; }
.lpav-star-label { display: inline-block; margin-left: 10px; font-weight: 600; color: var(--lpav-accent); vertical-align: 10px; }

/* Upload */
.lpav-form .lpav-upload {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	padding: 18px; border: 2px dashed #cfcfcf; border-radius: var(--lpav-radius); cursor: pointer; font-weight: 400; color: var(--lpav-muted);
	transition: border-color .15s, background .15s;
}
.lpav-upload:hover, .lpav-upload.is-drag { border-color: var(--lpav-accent); background: color-mix(in srgb, var(--lpav-accent) 5%, white); }
.lpav-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lpav-upload__icon { font-size: 26px; }
.lpav-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lpav-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.lpav-preview-error { color: #b42318; font-size: 13px; width: 100%; }

/* Caixa no "Ver pedido" */
.lpav-order-box { margin: 24px 0; padding: 18px; border: 1px solid var(--lpav-line); border-radius: var(--lpav-radius); }
.lpav-box__title { font-size: 18px; margin: 0 0 12px; }
.lpav-mini-list { list-style: none; margin: 0; padding: 0; }
.lpav-mini-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--lpav-line); }
.lpav-mini-item:last-child { border-bottom: 0; }
.lpav-mini-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; margin: 0 !important; }
.lpav-mini-item__name { flex: 1; font-size: 14px; }

@media (max-width: 640px) {
	.lpav-summary { grid-template-columns: 1fr; gap: 18px; }
	.lpav-summary__avg { font-size: 44px; }
	.lpav-toolbar { flex-direction: column; align-items: stretch; }
	.lpav-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.lpav-chip { flex: 0 0 auto; }
	.lpav-helpful { margin-left: 0; }
	.lpav-lightbox { padding: 56px 8px; }
}

/* =====================================================================
 * Blindagem contra estilos de botão do tema (v1.0.1)
 * Temas/Elementor costumam aplicar fundo, borda, padding e altura mínima
 * em todo <button>. Aqui os botões do plugin ignoram isso.
 * ===================================================================== */
.lpav button.lpav-bar,
.lpav button.lpav-photo,
.lpav button.lpav-chip,
.lpav button.lpav-helpful,
.lpav button.lpav-more,
.lpav .lpav-lightbox button {
	-webkit-appearance: none !important; appearance: none !important;
	background: transparent !important; background-image: none !important;
	border: 0 !important; border-radius: 0; box-shadow: none !important;
	padding: 0 !important; margin: 0 !important; min-height: 0 !important; min-width: 0 !important;
	height: auto; width: auto; color: inherit !important;
	font-family: inherit !important; font-size: inherit; font-weight: inherit; line-height: 1.4 !important;
	text-transform: none !important; letter-spacing: normal !important; text-decoration: none !important;
	text-shadow: none !important; outline-offset: 2px;
}

/* Estrelas: evita sobrepor o texto de baixo */
.lpav .lpav-summary__score > div { display: flex; flex-direction: column; gap: 6px; }
.lpav .lpav-summary__count { margin-top: 0; }

/* Barras de distribuição (linha fina, igual marketplace) */
.lpav .lpav-bars li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.lpav .lpav-bars li::before, .lpav .lpav-bars li::marker { content: none !important; }
.lpav button.lpav-bar {
	display: grid !important; grid-template-columns: 34px 1fr 28px !important; align-items: center !important;
	gap: 10px !important; width: 100% !important; height: 22px !important;
	font-size: 13px !important; color: var(--lpav-muted) !important; text-align: left !important; cursor: pointer;
}
.lpav button.lpav-bar:disabled { opacity: .55 !important; cursor: default; }
.lpav .lpav-bar__label, .lpav .lpav-bar__num { white-space: nowrap; }
.lpav .lpav-bar__track { display: block !important; height: 6px !important; background: #ececec !important; border-radius: 99px !important; overflow: hidden !important; }
.lpav .lpav-bar__fill { display: block !important; height: 100% !important; background: var(--lpav-accent) !important; }

/* Miniaturas das fotos */
.lpav button.lpav-photo {
	display: block !important; flex: 0 0 auto !important; width: 84px !important; height: 84px !important;
	border-radius: 6px !important; overflow: hidden !important; background: #f2f2f2 !important; cursor: zoom-in;
}
.lpav .lpav-item__photos button.lpav-photo { width: 72px !important; height: 72px !important; }
.lpav button.lpav-photo img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; display: block !important; margin: 0 !important; border-radius: 0 !important; }

/* Chips de filtro */
.lpav button.lpav-chip {
	display: inline-block !important; padding: 6px 14px !important; border-radius: 99px !important;
	font-size: 14px !important; background: #f2f2f2 !important; color: var(--lpav-text) !important; cursor: pointer; white-space: nowrap;
}
.lpav button.lpav-chip:hover { background: #e8e8e8 !important; }
.lpav button.lpav-chip.is-active {
	background: color-mix(in srgb, var(--lpav-accent) 12%, white) !important; color: var(--lpav-accent) !important; font-weight: 600 !important;
}

/* "É útil" */
.lpav button.lpav-helpful {
	padding: 5px 12px !important; border: 1px solid var(--lpav-line) !important; border-radius: 99px !important;
	font-size: 13px !important; color: var(--lpav-muted) !important; cursor: pointer;
}
.lpav button.lpav-helpful:hover, .lpav button.lpav-helpful.is-voted { border-color: var(--lpav-accent) !important; color: var(--lpav-accent) !important; }
.lpav button.lpav-helpful.is-voted { background: color-mix(in srgb, var(--lpav-accent) 8%, white) !important; }

/* "Ver mais" */
.lpav button.lpav-more {
	display: block !important; width: 100% !important; margin-top: 16px !important; padding: 12px !important;
	border-radius: 6px !important; text-align: center !important; font-weight: 600 !important;
	color: var(--lpav-accent) !important; background: color-mix(in srgb, var(--lpav-accent) 10%, white) !important; cursor: pointer;
}
.lpav button.lpav-more[hidden] { display: none !important; }

/* Lightbox */
.lpav .lpav-lightbox button {
	position: absolute !important; width: 48px !important; height: 48px !important; border-radius: 50% !important;
	display: flex !important; align-items: center !important; justify-content: center !important;
	color: #fff !important; font-size: 36px !important; line-height: 1 !important; cursor: pointer;
}
.lpav .lpav-lightbox button[hidden] { display: none !important; }
.lpav .lpav-lightbox button:hover { background: rgba(255,255,255,.12) !important; }

@media (max-width: 640px) {
	.lpav .lpav-summary { gap: 16px; }
	.lpav .lpav-summary__score { gap: 12px; }
	.lpav button.lpav-bar { grid-template-columns: 30px 1fr 24px !important; height: 20px !important; }
	.lpav button.lpav-photo { width: 76px !important; height: 76px !important; }
	.lpav button.lpav-helpful { margin-left: 0 !important; }
}

/* v1.0.2: resumo sem barras de distribuição */
.lpav .lpav-summary { display: block !important; }
