.fop-root,
.fop-root * {
	box-sizing: border-box;
}

.fop-root {
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: #17342b;
}

.fop-launcher {
	position: fixed;
	top: 50%;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 50px;
	min-height: 148px;
	padding: 14px 8px;
	border: 1px solid #dce5e1;
	border-radius: 0 14px 14px 0;
	background: #fff;
	box-shadow: 0 8px 28px rgba(16, 46, 37, .18);
	color: #17342b;
	cursor: pointer;
	transform: translateY(-50%);
	transition: transform .2s ease, box-shadow .2s ease;
}

.fop-position-left .fop-launcher { left: 0; }
.fop-position-right .fop-launcher {
	right: 0;
	border-radius: 14px 0 0 14px;
}

.fop-launcher:hover,
.fop-launcher:focus-visible {
	box-shadow: 0 10px 34px rgba(16, 46, 37, .26);
	outline: 3px solid rgba(0, 127, 95, .18);
	outline-offset: 2px;
}

.fop-launcher__text {
	font-weight: 700;
	letter-spacing: .01em;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}

.fop-launcher__star {
	font-size: 18px;
	color: var(--fop-star, #fac713);
}

.fop-screen {
	position: fixed;
	inset: 0;
	z-index: 99991;
	background: rgba(8, 30, 24, .48);
	backdrop-filter: blur(2px);
}

.fop-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 99992;
	width: min(450px, 100vw);
	background: #fff;
	box-shadow: 12px 0 36px rgba(8, 30, 24, .22);
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateX(-105%);
	transition: transform .28s ease;
}

.fop-position-right .fop-drawer {
	left: auto;
	right: 0;
	box-shadow: -12px 0 36px rgba(8, 30, 24, .22);
	transform: translateX(105%);
}

.fop-drawer.is-open { transform: translateX(0); }

.fop-drawer__header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 22px 12px;
	background: #fff;
}

.fop-drawer__header h2,
.fop-step h2,
.fop-success h2 {
	margin: 0;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 800;
	color: #17342b;
}

.fop-icon-button {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #17342b;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.fop-icon-button:hover,
.fop-icon-button:focus-visible { background: #eff6f3; outline: none; }

.fop-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 22px 20px;
	border-bottom: 1px solid #dfe7e4;
}

.fop-summary__score {
	display: grid;
	grid-template-columns: auto auto;
	align-items: center;
	gap: 2px 8px;
	white-space: nowrap;
}

.fop-summary__star { color: var(--fop-star, #fac713); font-size: 22px; }
.fop-summary__score strong { font-size: 18px; }
.fop-summary__count { grid-column: 1 / -1; color: #5d716a; font-size: 13px; }



/* Respeta el atributo HTML hidden aunque el tema o .fop-button definan display. */
.fop-root [hidden] {
	display: none !important;
}

.fop-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 10px;
	font: inherit;
	font-weight: 750;
	text-align: center;
	cursor: pointer;
	transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.fop-button:hover { transform: translateY(-1px); }
.fop-button:disabled { opacity: .58; cursor: wait; transform: none; }
.fop-button--dark { background: var(--fop-accent, #007f5f); color: #fff; }
.fop-button--outline { border-color: #cbd8d3; background: #fff; color: #17342b; }

.fop-sort {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	padding: 18px 22px;
	border-bottom: 1px solid #eef2f0;
	font-size: 13px;
}

.fop-sort label { color: #536961; }
.fop-sort select {
	max-width: 190px;
	padding: 6px 28px 6px 8px;
	border: 0;
	background: #fff;
	color: #17342b;
	font: inherit;
	font-weight: 700;
}

.fop-reviews { padding: 0 22px; }
.fop-review { padding: 22px 0; border-bottom: 1px solid #dfe7e4; }
.fop-review__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fop-review__top time { color: #657a72; font-size: 12px; }
.fop-stars { color: var(--fop-star, #fac713); letter-spacing: 2px; font-size: 18px; white-space: nowrap; }

.fop-review__identity {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
}

.fop-review__avatar { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.fop-review__identity > div { min-width: 0; }
.fop-review__identity strong { display: inline; font-size: 14px; text-transform: none; }
.fop-review__identity a { display: block; margin-top: 2px; color: var(--fop-accent, #007f5f); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.fop-verified { display: inline-block; margin-left: 5px; color: var(--fop-accent, #007f5f); font-size: 11px; font-weight: 700; }
.fop-review__text { margin-top: 14px; color: #203a31; }

.fop-review__media,
.fop-native-media {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.fop-review__media a,
.fop-native-media a {
	display: block;
	width: 94px;
	height: 94px;
	border: 1px solid #dfe7e4;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f8f7;
}

.fop-review__media img,
.fop-native-media img { width: 100%; height: 100%; object-fit: cover; }
.fop-review__footer { display: flex; justify-content: flex-end; margin-top: 10px; }
.fop-helpful { display: inline-flex; align-items: center; gap: 5px; padding: 4px 2px; border: 0; background: transparent; color: #17342b; font: inherit; cursor: pointer; }
.fop-helpful:hover { color: var(--fop-accent, #007f5f); }
.fop-empty { padding: 38px 22px; text-align: center; color: #687d75; }
.fop-load-more { display: block; width: calc(100% - 44px); margin: 18px 22px 28px; padding: 12px; border: 1px solid #cdd9d5; border-radius: 10px; background: #fff; color: #17342b; font: inherit; font-weight: 700; cursor: pointer; }

.fop-modal {
	position: fixed;
	inset: 0;
	z-index: 99994;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(7, 28, 22, .68);
	backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease;
}

.fop-modal.is-open { opacity: 1; visibility: visible; }
.fop-modal__panel {
	position: relative;
	width: min(520px, 100%);
	min-height: min(650px, calc(100vh - 40px));
	max-height: calc(100vh - 40px);
	display: flex;
	flex-direction: column;
	padding: 38px 36px 26px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
	overflow-y: auto;
}

.fop-modal__close { position: absolute; top: 14px; right: 14px; }
.fop-form { min-height: 570px; display: flex; flex-direction: column; }
.fop-step { flex: 1; padding-top: 14px; }
.fop-step h2,
.fop-step__intro { text-align: center; }
.fop-step__intro { max-width: 430px; margin: 10px auto 22px; color: #536961; }

.fop-current-product,
.fop-selected-product {
	margin: 14px 0 18px;
	padding: 12px 14px;
	border: 1px solid #dce7e2;
	border-radius: 10px;
	background: #f5faf8;
}

.fop-product-picker label,
.fop-fields label { display: block; margin-bottom: 8px; font-weight: 700; }
.fop-product-picker input,
.fop-fields input,
.fop-step textarea {
	width: 100%;
	border: 1px solid #cbd8d3;
	border-radius: 9px;
	background: #fff;
	color: #17342b;
	font: inherit;
	outline: none;
}

.fop-product-picker input,
.fop-fields input { min-height: 46px; padding: 10px 12px; }
.fop-step textarea { min-height: 190px; padding: 14px; resize: vertical; }
.fop-product-picker input:focus,
.fop-fields input:focus,
.fop-step textarea:focus { border-color: var(--fop-accent, #007f5f); box-shadow: 0 0 0 3px rgba(0, 127, 95, .12); }
.fop-fields label { margin-bottom: 14px; }
.fop-fields label span { font-weight: 400; color: #6f817b; }

.fop-product-results {
	margin-top: 6px;
	border-radius: 9px;
	overflow: hidden;
	box-shadow: 0 12px 30px rgba(16, 46, 37, .14);
}

.fop-product-result {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px;
	border: 0;
	border-bottom: 1px solid #e8efec;
	background: #fff;
	color: #17342b;
	text-align: left;
	font: inherit;
	cursor: pointer;
}
.fop-product-result:last-child { border-bottom: 0; }
.fop-product-result:hover { background: #f3f8f6; }
.fop-product-result img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }

.fop-rating-fieldset { margin: 10px 0 0; padding: 0; border: 0; text-align: center; }
.fop-rating-fieldset legend { width: 100%; margin-bottom: 10px; color: #536961; }
.fop-rating { display: inline-flex; flex-direction: row; gap: 12px; }
.fop-rating__star { padding: 0; border: 0; background: transparent; color: #e8eeeb; font-size: 46px; line-height: 1; cursor: pointer; transition: transform .15s ease, color .15s ease; }
.fop-rating__star.is-active { color: var(--fop-star, #fac713); }
.fop-rating__star:hover { transform: scale(1.08); }
.fop-character-count { margin-top: 6px; color: #72847e; text-align: right; font-size: 12px; }

.fop-upload {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 32px 18px;
	border: 1px dashed #bccdc6;
	border-radius: 12px;
	color: #536961;
	text-align: center;
	cursor: pointer;
}
.fop-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.fop-media-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.fop-media-preview__item { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #eef3f1; }
.fop-media-preview__item img { width: 100%; height: 100%; object-fit: cover; }
.fop-media-preview__item button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 25px; height: 25px; border: 0; border-radius: 50%; background: rgba(15, 38, 31, .86); color: #fff; cursor: pointer; }

.fop-consent { display: flex !important; align-items: flex-start; gap: 9px; font-size: 13px; font-weight: 500 !important; }
.fop-consent input { flex: 0 0 auto; width: 17px; min-height: 17px; height: 17px; margin-top: 2px; }
.fop-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.fop-progress { height: 4px; margin-top: 18px; border-radius: 999px; background: #edf2f0; overflow: hidden; }
.fop-progress span { display: block; width: 25%; height: 100%; background: var(--fop-accent, #007f5f); transition: width .2s ease; }
.fop-form-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; }
.fop-form-actions [data-fop-next],
.fop-form-actions [data-fop-submit] { margin-left: auto; }
.fop-form-message { margin-top: 12px; padding: 11px 13px; border-radius: 8px; background: #fff0f0; color: #a11b1b; font-weight: 600; }

.fop-success { min-height: 560px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.fop-success__icon { display: grid; place-items: center; width: 70px; height: 70px; margin-bottom: 18px; border-radius: 50%; background: #e7f6ef; color: var(--fop-accent, #007f5f); font-size: 38px; font-weight: 800; }
.fop-success p { max-width: 380px; color: #536961; }
.fop-success .fop-button { margin-top: 12px; }
.fop-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
body.fop-lock { overflow: hidden !important; }

@media (max-width: 767px) {
	.fop-root[data-mobile="0"] .fop-launcher { display: none; }
	.fop-launcher {
		top: auto;
		bottom: 104px;
		width: 46px;
		min-height: 122px;
		padding: 10px 6px;
		transform: none;
	}
	.fop-drawer { width: 100vw; }
	.fop-summary { align-items: stretch; }
	.fop-summary .fop-button { min-height: 42px; padding: 8px 12px; font-size: 13px; }
	.fop-modal { padding: 0; align-items: end; }
	.fop-modal__panel {
		width: 100%;
		min-height: 100dvh;
		max-height: 100dvh;
		padding: 42px 20px 18px;
		border-radius: 0;
	}
	.fop-form { min-height: calc(100dvh - 62px); }
	.fop-rating { gap: 6px; }
	.fop-rating__star { font-size: 41px; }
	.fop-media-preview { grid-template-columns: repeat(3, 1fr); }
}
