.testimonials-widget-wrapper {
    display: flex;
    gap: 40px;
    background-color: white;
    overflow: hidden;
}

.testimonials-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.testimonials-widget-body {
    flex: 1 1 auto;
}

.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-wrap {
    display: flex;
    flex-direction: column;
}

.testimonials-stars-display {
	display: inline-flex;
	gap: 3px;
}

.testimonials-star-icon {
	color: var(--colorTheme);
	font-size: 18px;
}

.testimonials-star-icon.testimonials-star-empty {
	color: var(--borderColor);
}

.testimonials-total-count {
	font-size: 13px;
	color: var(--colorName);
}

.grade__container {
    width: 300px;
}

.grade__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    column-gap: 10px;
}

.grade__item-level {
    display: flex;
    align-items: center;
    column-gap: 5px;
}

.grade__item-star {
    font-size: 20px;
}

.grade__bar {
    flex: 1 1 auto;
    height: 10px;
    background-color: var(--h3-bg);
    border-radius: 5px;
    overflow: hidden;
}

.grade__bar-fill {
    height: 100%;
    background-color: var(--colorTheme);
}

.testimonials-add-button {
    width: 100%;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--h3-bg);
    border: 1px solid var(--borderColor);
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    transition: .2s;
}

.testimonials-add-button:hover {
	background-color: var(--borderColor2);
}

.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);
}

.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;
}

.testimonials-single-item {
	padding: 10px;
	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;
	gap: 10px;
}

.testimonials-author-block {
	display: flex;
	gap: 12px;
}

.testimonials-author-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--colorTheme);
    color: white;
    font-weight: 500;
}
.testimonials-author-avatar .icon.icon-user {
    width: 100%;
    height: 100%;
}

.testimonials-author-details h4 {
	font-size: 15px;
	color: var(--font-color);
	margin-bottom: 3px;
	font-weight: 600;
}

.testimonials-publish-date {
	font-size: 12px;
	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;
}

.testimonials-item-photo {
	width: 64px;
	height: 64px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--borderColor2);
	cursor: pointer;
	transition: .2s;
}

.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 {
    padding: 15px;
    background-color: white;
    border: 1px dashed var(--borderColor2);
    border-left: 3px solid var(--colorTheme);
}

.testimonials-admin-response-top {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.testimonials-admin-label {
    padding: 5px 10px;
    background-color: var(--colorTheme);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1;
}

.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-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .grade__container {
        width: 100%;
    }
    .testimonials-form-block {
        padding: 15px;
    }
	
	.testimonials-form-actions {
		flex-direction: column;
	}

	.testimonials-button {
		width: 100%;
	}

}

.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;
}
.popup-content.review-content {
    width: 100%;
    max-width: 95svh;
    height: 95svh;
    border: 2px solid var(--colorTheme);
}
@media (max-width:799.98px) {
    .popup-content.review-content {
        flex: 0 0 100%;
        height: 100%;
        border-radius: 0;
    }
}
.review-photo-slider {
    height: 100%;
}
.swiper-review-photo {
    height: 100%;
}
.swiper-review-photo-slide {
    display: flex;
    justify-content: center;
}
.swiper-review-photo-slide img {
    border-radius: 5px;
    object-fit: contain;
    user-select: none;
}
.swiper-review-photo .swiper-button-prev, .swiper-review-photo .swiper-button-next {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    transition: .2s;
}
.swiper-review-photo .icon.icon-arrow-bottom {
    width: 25px;
    height: 25px;
    stroke-width: 2px;
    stroke: var(--colorTheme);
    fill: var(--colorTheme);
}
.swiper-review-photo .swiper-button-prev:hover, .swiper-review-photo .swiper-button-next:hover {
    scale: 1.1;
}
.swiper-review-photo .swiper-button-next {
    transform: rotate(270deg);
}
.swiper-review-photo .swiper-button-prev {
    transform: rotate(90deg);
}
.swiper-button-next:after, .swiper-button-prev:after {
    content: '';
}