:root {
	--bgLight: #ecf0f3;
	--borderColor: #c8cadd;
	--borderColor2: #dbdcee;
	--borderColor3: #cecdef;
	--borderColor4: #dde1f8;
	--borderColor5: #c7cdff;
	--colorTheme: #39aa25;
	--colorName: #7f7f7f;
	--colorDisabled: #a1a1a1;
	--bordo: #af1919;
	--coral: #ff5858;
	--cream: #ffdead;
	--cream2: #ffeccf;
	--green: #178810;
	--green2: #cdefde;
	--green3: #f4fffa;
	--orange: #f16800;
	--orange2: #ad6c3d;
	--pink: #ffdbdb;
	--h3-bg: #e2e4f5;
	--link-hover: #305830;
	--font-color: #505471;
	--thumb-bg: #f8fafb;
	--thumb-border: 1px solid #e2e4f5;
	--popup-bg: #adadad9e;
	--in-stock-color: #067100;
	--placeholder-color: #9597af;
	--top-menu-bg-pk: #f9fafc;
}

.testimonials-widget-wrapper {
	margin: 0 auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.testimonials-widget-header {
	background: #fff;
	border-bottom: 1px solid var(--borderColor2);
	padding: 20px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.testimonials-widget-header h2 {
	font-size: 20px;
	color: var(--font-color);
	font-weight: 600;
}

.testimonials-widget-stats {
	display: flex;
	align-items: center;
	gap: 15px;
}

.testimonials-rating-average {
	font-size: 24px;
	font-weight: 700;
	color: var(--colorTheme);
}

.testimonials-stars-display {
	display: inline-flex;
	gap: 3px;
}

.testimonials-star-icon {
	color: #ffd700;
	font-size: 18px;
}

.testimonials-star-icon.testimonials-star-empty {
	color: var(--borderColor);
}

.testimonials-total-count {
	font-size: 13px;
	color: var(--colorName);
}

.testimonials-widget-body {
	padding: 30px;
}

.testimonials-add-button {
	width: 100%;
	padding: 14px;
	background: var(--colorTheme);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.testimonials-add-button:hover {
	background: #329520;
}

.testimonials-form-wrapper {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease;
}

.testimonials-form-wrapper.testimonials-form-active {
	max-height: 1000px;
}

.testimonials-form-block {
	background: var(--thumb-bg);
	padding: 25px;
	border-radius: 6px;
	border: 1px solid var(--borderColor2);
	margin-top: 24px;
}

.testimonials-field-group {
	margin-bottom: 20px;
}

.testimonials-field-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: var(--font-color);
	font-size: 14px;
}

.testimonials-field-group input,
.testimonials-field-group textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--borderColor);
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s ease;
	background: #fff;
	color: var(--font-color);
}

.testimonials-field-group input::placeholder,
.testimonials-field-group textarea::placeholder {
	color: var(--placeholder-color);
}

.testimonials-field-group input:focus,
.testimonials-field-group textarea:focus {
	outline: none;
	border-color: var(--colorTheme);
}

.testimonials-field-group textarea {
	resize: vertical;
	min-height: 100px;
}

.testimonials-rating-selector {
	display: flex;
	gap: 6px;
	font-size: 28px;
}

.testimonials-rating-selector .testimonials-star-selectable {
	cursor: pointer;
	color: var(--borderColor);
	transition: color 0.2s ease;
}

.testimonials-rating-selector .testimonials-star-selectable:hover,
.testimonials-rating-selector .testimonials-star-selectable.testimonials-star-selected {
	color: var(--colorTheme);
}

.testimonials-photo-upload {
	margin-top: 10px;
}

.testimonials-photo-upload-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #fff;
	border: 1px solid var(--borderColor);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 14px;
	color: var(--font-color);
}

.testimonials-photo-upload-label:hover {
	border-color: var(--colorTheme);
	background: var(--thumb-bg);
}

.testimonials-photo-upload input[type="file"] {
	display: none;
}

.testimonials-photo-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.testimonials-photo-preview-item {
	position: relative;
	width: 100px;
	height: 100px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--borderColor2);
}

.testimonials-photo-preview-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.testimonials-photo-preview-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	background: rgba(175, 25, 25, 0.9);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1;
	transition: background 0.2s ease;
	font-weight: normal;
	padding: 0;
}

.testimonials-photo-preview-remove:hover {
	background: var(--bordo);
}

.testimonials-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.testimonials-form-actions .testimonials-button{
	width: auto;
}

.testimonials-button {
	padding: 10px 20px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	background: var(--colorTheme);
	color: #fff;
	margin-top: 16px;
	width: 100%;
}

.testimonials-button-submit {
	background: var(--colorTheme);
	color: #fff;
}

.testimonials-button-submit:hover {
	background: var(--font-color);
}

.testimonials-button-cancel {
	background: var(--borderColor2);
	color: var(--font-color);
}

.testimonials-button-cancel:hover {
	background: var(--borderColor);
}

.testimonials-items-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 24px;
}

.testimonials-single-item {
	padding: 20px;
	background: var(--thumb-bg);
	border: 1px solid var(--borderColor2);
	border-radius: 6px;
	transition: all 0.2s ease;
}

.testimonials-single-item:hover {
	border-color: var(--borderColor);
}

.testimonials-item-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 12px;
}

.testimonials-author-block {
	display: flex;
	align-items: center;
	gap: 12px;
}

.testimonials-author-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--colorTheme);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 600;
	font-size: 16px;
}

.testimonials-author-details h4 {
	font-size: 15px;
	color: var(--font-color);
	margin-bottom: 3px;
	font-weight: 600;
}

.testimonials-publish-date {
	font-size: 13px;
	color: var(--colorName);
}

.testimonials-item-rating {
	display: flex;
	gap: 3px;
}

.testimonials-item-rating .testimonials-star-icon {
	font-size: 16px;
}

.testimonials-item-content {
	color: var(--font-color);
	line-height: 1.6;
	margin-bottom: 12px;
	font-size: 14px;
}

.testimonials-item-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.testimonials-item-photo {
	width: 120px;
	height: 120px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--borderColor2);
	cursor: pointer;
	transition: all 0.2s ease;
}

.testimonials-item-photo:hover {
	border-color: var(--colorTheme);
	transform: scale(1.02);
}

.testimonials-item-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.testimonials-item-actions {
	display: flex;
	gap: 15px;
}

.testimonials-action-link {
	background: none;
	border: none;
	color: var(--colorTheme);
	font-size: 13px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 4px 0;
	transition: color 0.2s ease;
	font-weight: 500;
}

.testimonials-action-link:hover {
	color: var(--font-color);
}

.testimonials-admin-response {
	margin-top: 16px;
	padding: 16px;
	background: #fff;
	border-left: 3px solid var(--colorTheme);
	border-radius: 4px;
}

.testimonials-admin-response-top {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.testimonials-admin-label {
	background: var(--colorTheme);
	color: #fff;
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.testimonials-admin-response-content {
	color: var(--font-color);
	line-height: 1.6;
	font-size: 14px;
}

.testimonials-reply-form {
	margin-top: 12px;
	display: none;
}

.testimonials-reply-form.testimonials-reply-active {
	display: block;
}

.testimonials-reply-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--borderColor);
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	min-height: 80px;
	margin-bottom: 10px;
	background: #fff;
	color: var(--font-color);
}

.testimonials-reply-form textarea:focus {
	outline: none;
	border-color: var(--colorTheme);
}

.testimonials-empty-state {
	text-align: center;
	padding: 60px 20px;
	color: var(--colorDisabled);
}

.testimonials-empty-state svg {
	width: 60px;
	height: 60px;
	margin-bottom: 16px;
	opacity: 0.3;
}

.testimonials-empty-state p {
	font-size: 15px;
}

/* Модальное окно для просмотра фото */
.testimonials-photo-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: var(--popup-bg);
	align-items: center;
	justify-content: center;
}

.testimonials-photo-modal.active {
	display: flex;
}

.testimonials-photo-modal-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
}

.testimonials-photo-modal-content img {
	max-width: 100%;
	max-height: 90vh;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.testimonials-photo-modal-close {
	position: absolute;
	top: -40px;
	right: 0;
	background: #fff;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--font-color);
}

.testimonials-photo-modal-close:hover {
	background: var(--borderColor2);
}

@media (max-width: 768px) {
	.testimonials-widget-header {
		flex-direction: column;
		gap: 12px;
		align-items: flex-start;
	}

	.testimonials-widget-body {
		padding: 20px;
	}

	.testimonials-item-top {
		flex-direction: column;
		gap: 10px;
	}

	.testimonials-form-actions {
		flex-direction: column;
	}

	.testimonials-button {
		width: 100%;
	}

	.testimonials-item-photo {
		width: 100px;
		height: 100px;
	}
}

.reviews-skeleton {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reviews-skeleton-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    background: #eee;
    border-radius: 8px;
    animation: skeletonBlink 1.6s infinite linear;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 14px;
    background: #eee;
    border-radius: 4px;
    animation: skeletonBlink 1.6s infinite linear;
}

.skeleton-line.short {
    width: 40%;
}

@keyframes skeletonBlink {
    0%   { background-color: #eee; }
    50%  { background-color: #f5f5f5; }
    100% { background-color: #eee; }
}


.testimonials-form-response {
	width: 100%;
    display: none;
    padding: 15px 20px;
    margin-top: 15px;
    border-radius: 8px;
    background-color: #d4edda;
    color: #155724;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Появление */
.testimonials-form-response.show {
   	display: block;
}