/*
 * Pizzapatrullen – Visitor Rating
 * Betyg och korta besökskommentarer.
 */

.pp-visitor-rating {
	margin: 24px auto 26px;
	padding: 19px 20px 20px;
	border: 1px solid #eadfc9;
	border-top: 3px solid #dca63a;
	border-radius: 12px;
	background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
	box-shadow: 0 7px 22px rgba(83, 57, 25, 0.09);
	text-align: center;
}

.pp-visitor-rating-title {
	margin: -2px 0 13px;
	font: inherit;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 700;
	color: #76552d;
	text-align: center;
}

.pp-visitor-rating-stars {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.pp-visitor-rating-star {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	width: 32px;
	height: 36px;
	font-size: 31px;
	line-height: 36px;
	cursor: pointer;
	color: #d8c8a8;
	opacity: 1;
	transition: transform 0.12s ease;
	position: relative;
	text-align: center;
	font-family: Arial, sans-serif;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
	-webkit-tap-highlight-color: transparent;
}

.pp-visitor-rating-star::before {
	content: '★';
	position: absolute;
	inset: 0;
	line-height: 36px;
	background: linear-gradient(90deg, #e6ad36 var(--pp-star-fill, 0%), #d6c7a8 var(--pp-star-fill, 0%));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.pp-visitor-rating-star:hover,
.pp-visitor-rating-star:focus-visible {
	opacity: 1;
	transform: scale(1.08);
	outline: 2px solid #b8860b;
	outline-offset: 3px;
}

.pp-visitor-rating-star.is-active {
	opacity: 1;
}

.pp-visitor-rating-result {
	margin-top: 6px;
	font: inherit;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

.pp-visitor-rating-average {
	font-weight: 600;
}

.pp-visitor-rating-saving,
.pp-visitor-rating-thanks {
	font-weight: 600;
}

.pp-visitor-rating-error {
	font-size: 12px;
}

/* Korta besökskommentarer – separat från Gästpatrullens recensioner. */
.pp-short-comment-form {
	max-width: 520px;
	margin: 16px auto 0;
	padding: 16px 17px;
	text-align: left;
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid #eee3d1;
	border-radius: 9px;
	box-shadow: 0 3px 10px rgba(83, 57, 25, 0.045);
}

.pp-short-comment-form h4 {
	margin: 0 0 5px;
	font-size: 15px;
	text-align: center;
	color: #704d25;
}

.pp-short-comment-form > p {
	margin: 5px 0 10px;
	font-size: 12px;
	text-align: center;
}

.pp-short-comment-form textarea,
.pp-short-comment-form input[name="signature"] {
	display: block;
	width: 100%;
	margin: 8px 0;
	padding: 9px;
	border: 1px solid #d8cdbb;
	border-radius: 5px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	box-sizing: border-box;
}

.pp-short-comment-form textarea:focus,
.pp-short-comment-form input[name="signature"]:focus {
	border-color: #c99a43;
	outline: 2px solid rgba(201, 154, 67, 0.16);
}

.pp-short-comment-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 10px;
}

.pp-short-comment-form button {
	display: inline-block;
	margin: 0;
	padding: 8px 16px;
	border: 0;
	border-radius: 5px;
	background: #922b2b;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.pp-short-comment-form button:hover:not(:disabled) {
	background: #762020;
	transform: translateY(-1px);
}

.pp-short-comment-form button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.pp-short-comment-status {
	font-size: 12px;
	text-align: center;
}

.pp-short-comment-warning {
	color: #9b2929;
	font-weight: 600;
}

.pp-short-comment-trap {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}


/* Tackpanel efter en inskickad frivillig snabbkommentar.
 * Enbart stjärnbetyg visar aldrig panelen. */
.pp-short-comment-thanks {
	max-width: 560px;
	margin: 16px auto 0;
	padding: 15px 17px 14px;
	background: rgba(255, 255, 255, .92);
	border: 1px solid #eadfc9;
	border-radius: 9px;
	box-shadow: 0 3px 10px rgba(83, 57, 25, .045);
	text-align: left;
}

.pp-short-comment-thanks-header {
	position: relative;
	overflow: visible;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-direction: row-reverse;
	gap: 8px;
	min-height: 176px;
}

.pp-short-comment-mascot {
	position: relative;
	z-index: 1;
	width: 154px;
	height: 176px;
	flex: 0 0 154px;
	object-fit: contain;
	object-position: center bottom;
	border-radius: 0;
	background: transparent;
}

/* Mjuk, statisk markskugga som ger soldaten lite förankring. */
.pp-short-comment-mascot-shadow {
	position: absolute;
	right: 30px;
	bottom: 0;
	width: 96px;
	height: 11px;
	border-radius: 50%;
	background: rgba(75, 57, 35, .16);
	filter: blur(5px);
	z-index: 0;
	pointer-events: none;
}

/* Tre små, statiska ostgula streck – placerade ovanför och till vänster om tummen. */

.pp-short-comment-thanks-copy h4 {
	margin: 0 0 4px;
	color: #704d25;
	font-size: 18px;
	line-height: 1.3;
	text-align: left;
}

.pp-short-comment-thanks-copy p {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
}

.pp-short-comments {
	max-width: 560px;
	margin: 16px auto 0;
	padding-top: 13px;
	border-top: 1px solid #eadfc9;
	text-align: left;
}

.pp-short-comments-heading {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	color: #76552d;
}

.pp-short-comment {
	margin: 6px 0;
	padding: 9px 11px;
	background: #fff;
	border: 1px solid #eee6d9;
	border-radius: 7px;
	box-shadow: 0 2px 7px rgba(83, 57, 25, 0.045);
	font-size: 13px;
	line-height: 1.45;
}

.pp-short-comment small {
	font-size: 11px;
	opacity: .75;
}

.pp-short-comments-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.pp-short-comments-controls button {
	appearance: none;
	border: 1px solid #d8c7a8;
	border-radius: 6px;
	background: #fffaf1;
	color: #76552d;
	padding: 7px 11px;
	font: inherit;
	font-size: 12px;
	line-height: 1.35;
	cursor: pointer;
}

.pp-short-comments-controls button:hover {
	background: #f5ead7;
}

.pp-short-comments-controls button:focus-visible {
	outline: 2px solid #9b6b2f;
	outline-offset: 2px;
}

.pp-short-comments [hidden] {
	display: none !important;
}

@media (max-width: 600px) {
	.pp-visitor-rating {
		margin: 20px auto;
		padding: 16px 12px;
		border-radius: 10px;
	}

	.pp-short-comment-form {
		padding: 13px 11px;
	}
	.pp-short-comment-thanks { padding: 12px 11px; }
	.pp-short-comment-thanks-header { justify-content: flex-start; flex-direction: row-reverse; gap: 6px; min-height: 142px; }
	.pp-short-comment-mascot { width: 122px; height: 142px; flex-basis: 122px; }
	.pp-short-comment-mascot-shadow { right: 18px; width: 78px; height: 9px; }
	.pp-short-comment-thanks-copy h4 { font-size: 16px; }
}

/* Betyg kan endast ändras under de första 24 timmarna. */
.pp-visitor-rating-star:disabled {
	cursor: not-allowed;
	opacity: 0.55;
	transform: none;
}

.pp-short-comment-form button.pp-short-comment-decline {
	background: transparent;
	border: 1px solid #d8cdbb;
	color: #76552d;
}

.pp-short-comment-form button.pp-short-comment-decline:hover {
	background: #f6f0e6;
	transform: none;
}
