/* CSS styly pro recenze - reviews.css */

/* Hlavní kontejner */
#vstar-reviews {
	width: 100%;
	max-width: 1200px;
	margin: 40px auto;
	float: left;
	clear: both;
}

/* Hlavička s hodnocením */
.review-head-type2 {
	background: #fff;
	border-radius: 15px;
	padding: 20px;
	margin-bottom: 30px;
	box-shadow: 0px 12px 16px -4px #00000014;
}

.tt-head-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.tt-head-left {
	display: flex;
	align-items: center;
	gap: 20px;
}

.product-rating {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.point {
	margin: 0;
}

.big-point {
	font-size: 48px;
	font-weight: bold;
	color: #3B1101;
	margin-right: 15px;
}

.vstar-star {
	display: flex;
	gap: 4px;
}

.star-item {
	width: 20px;
	height: 20px;
	position: relative;
}

.star-item svg {
	width: 100%;
	height: 100%;
	fill: #FFD700;
}

.star-item.star-empty svg {
	fill: #E0E0E0;
}

.star-item.half-star {
	position: relative;
}

.item-nostar svg {
	fill: #E0E0E0;
}

.item-star {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
}

.reviews-num {
	color: #666;
	margin: 0;
	font-size: 14px;
}

/* Tlačítka v hlavičce */
.tt-head-right {
	display: flex;
	gap: 15px;
	align-items: center;
}

.head-button {
	background: var(--main);
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 26px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.3s;
}

.head-button:hover {
	background: var(--green);
}

/* Řazení */
.head-sort {
	position: relative;
}

.sort-content {
	position: relative;
}

.sort-icon {
	cursor: pointer;
	padding: 8px;
	border-radius: 4px;
	transition: background 0.2s;
}

.sort-icon:hover {
	background: #f5f5f5;
}

.sort-popup {
	position: absolute;
	top: 100%;
	right: 0;
	background: white;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	min-width: 200px;
	z-index: 1000;
	margin-top: 8px;
}

.sort-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sort-title {
	padding: 12px 16px;
	font-weight: 600;
	color: #3B1101;
	border-bottom: 1px solid #e0e0e0;
}

.sort-item {
	padding: 12px 16px;
	cursor: pointer;
	transition: background 0.2s;
}

.sort-item:hover {
	background: #f5f5f5;
}

.sort-item.active {
	background: #e7dbf1;
	color: #000;
	font-weight: 500;
}

/* Seznam recenzí */
.tt-review-list {
	display: flex;
	flex-direction: column;
	gap: 0px;
}

.user-msg-name {
	display: flex;
	align-content: center;
	align-items: center;
	gap: 10px;
}

.user-msg-badge {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.list-review {
	border-radius: 0px;
	padding: 20px 0;
	transition: box-shadow 0.3s;
	border-bottom: 1px solid rgba(0,0,0,.1);
}

.list-review:last-child {
	border-bottom: 0;
}

.list-review:hover {
}

.list-review-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.user-message {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tt-review-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #3B1101;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 14px;
}

.author-name {
	font-weight: 600;
	color: #333;
}

.reviews-date {
	color: #999;
	font-size: 13px;
}

/* Tělo recenze */
.list-review-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.reviews-text {
	color: #444;
	line-height: 1.6;
	margin: 0;
}

/* Obrázky v recenzi */
.resource-list {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.resource-item img {
	max-width: 200px;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.2s;
}

.resource-item img:hover {
	transform: scale(1.05);
}

/* Užitečnost */
.review-helpful {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #666;
	font-size: 14px;
	margin-top: 10px;
}

.tt-helpful,
.tt-unhelpful {
	cursor: pointer;
	transition: transform 0.2s;
}

.tt-helpful:hover,
.tt-unhelpful:hover {
	transform: scale(1.1);
}

.tt-helpful svg path,
.tt-unhelpful svg path {
	fill: #999;
	transition: fill 0.2s;
}

.tt-helpful:hover svg path {
	fill: #4CAF50;
}

.tt-unhelpful:hover svg path {
	fill: #f44336;
}

.tt-helpful.voted svg path {
	fill: #4CAF50;
}

.tt-unhelpful.voted svg path {
	fill: #f44336;
}

/* Paginace */
.page-control {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	list-style: none;
	padding: 20px 0;
	margin: 0;
}

.page-control-item,
.page-control-button {
	min-width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	background: white;
	border: 1px solid #e0e0e0;
}

.page-control-item:hover,
.page-control-button:hover {
	background: #f5f5f5;
}

.page-control-item.active {
	background: #3B1101;
	color: white;
	border-color: #3B1101;
	font-weight: 600;
}

/* Loading */
#tt-reviews-loading {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px;
	gap: 10px;
}

.tt-loading-item {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #3B1101;
	animation: loading-bounce 1.4s infinite ease-in-out both;
}

.tt-loading-2 {
	animation-delay: -0.32s;
}

.tt-loading-3 {
	animation-delay: -0.16s;
}

@keyframes loading-bounce {
	0%, 80%, 100% {
		transform: scale(0);
	}
	40% {
		transform: scale(1);
	}
}

/* Modal */
.modal {
	display: none;
	position: fixed;
	z-index: 99999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.5);
	animation: fadeIn 0.3s;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.modal-content {
	background-color: #fff;
	margin: 5% auto;
	padding: 30px;
	border-radius: 12px;
	width: 90%;
	max-width: 600px;
	box-sizing: border-box;
	position: relative;
	animation: slideIn 0.3s;
}

@keyframes slideIn {
	from {
		transform: translateY(-50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.close {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	transition: color 0.2s;
}

.close:hover,
.close:focus {
	color: #000;
}

.modal-content h2 {
	margin-top: 0;
	color: #3B1101;
}

/* Formulář */
.form-group {
	margin-bottom: 0px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
}

.form-group input[type="text"],
.form-group textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
	outline: none;
	border-color: #3B1101;
}

.form-group textarea {
	resize: vertical;
	min-height: 100px;
}

/* Hodnocení v formuláři */
#rating-input {
	display: flex;
	gap: 8px;
	position: relative;
	top: -17px;
}

#rating-input .star {
	font-size: 32px;
	color: #E0E0E0;
	cursor: pointer;
	transition: all 0.2s;
}

#rating-input .star:hover,
#rating-input .star.active {
	color: #FFD700;
	transform: scale(1.1);
}

/* Upload obrázku */
.form-group input[type="file"] {
	border: 2px dashed #ddd;
	padding: 20px;
	height: 80px;
	border-radius: 6px;
	width: 100%;
	cursor: pointer;
	transition: border-color 0.2s;
}

.form-group input[type="file"]:hover {
	border-color: #3B1101;
}

#image-preview img {
	max-width: 100%;
	border-radius: 6px;
}

/* Tlačítka formuláře */
.form-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 24px;
}

.btn-submit,
.btn-cancel {
	padding: 12px 24px;
	border: none;
	border-radius: 26px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s;
}

.btn-submit {
	background: var(--main);
	color: white;
}

.btn-submit:hover {
	background: var(--green);
}

.btn-cancel {
	background: #f5f5f5;
	color: #666;
}

.btn-cancel:hover {
	background: #e0e0e0;
}

/* Chybové a prázdné stavy */
.error-message,
.no-reviews {
	text-align: center;
	padding: 40px 20px;
	color: #666;
	font-size: 16px;
}

/* Responsivní design */
@media (max-width: 768px) {
	.tt-head-content {
		flex-direction: column;
		align-items: flex-start;
	}

	.big-point {
		font-size: 36px;
	}

	.list-review-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.modal-content {
		width: 95%;
		margin: 10% auto;
		padding: 20px;
	}

	.form-actions {
		flex-direction: column;
	}

	.btn-submit,
	.btn-cancel {
		width: 100%;
	}
}