/* ============================================
   MODAL WINDOWS STYLES
   ============================================ */

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.modal-content {
	background: white;
	border-radius: 8px;
	width: calc(100vw - 32px);
	height: calc(100vh - 32px);
	max-height: 720px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	transform: scale(0.9);
	transition: transform 0.3s ease;
	padding: 24px 24px 18px 24px;
}

.modal-content-ratings-info {
	background: white;
	border-radius: 8px;
	width: calc(100vw - 32px);
	max-height: 500px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	transform: scale(0.9);
	transition: transform 0.3s ease;
	padding: 24px 24px 18px 24px;
}

.modal-overlay.active .modal-content {
	transform: scale(1);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-title {
	font-family: 'Google Sans', Roboto, Arial, sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: var(--gp-text-primary);
	margin-bottom: 12px;
}

.modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--gp-text-secondary);
	cursor: pointer;
	padding: 8px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
}

.modal-close:hover {
	background-color: var(--gp-divider);
}

.modal-body {
	text-align: left;
	font-family: Roboto, Arial, sans-serif;
	font-size: 14px;
	color: var(--gp-text-secondary);
	line-height: 20px;
	letter-spacing: 0.2px;
	margin: 0;
}

.modal-icon {
	margin-bottom: 16px;
}

.modal-text {
	font-family: Roboto, Arial, sans-serif;
	font-size: 14px;
	color: var(--gp-text-secondary);
	line-height: 1.5;
	margin: 0;
}

/* Modal Footer */
.modal-footer {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	height: 52px;
}

.modal-button {
	border: none;
	background: transparent;
	font-family: 'Google Sans';
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 0.15px;
	color: var(--gp-primary);
	cursor: pointer;
	padding: 8px 16px;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.modal-button:hover {
	background-color: var(--gp-surface);
}

.modal-button.primary {
	background-color: var(--gp-primary);
	color: white;
}

.modal-button.primary:hover {
	background-color: var(--gp-primary-dark);
}

.modal-button.secondary {
	color: var(--gp-text-secondary);
}

/* ============================================
   APP DETAILS MODAL
   ============================================ */

.app-details-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 10001;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.app-details-modal.active {
	opacity: 1;
	visibility: visible;
}

.app-details-content {
	width: 100%;
	background-color: var(--gp-background);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	overflow: auto;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	transform: scale(0.9) translateY(20px);
	transition: transform 0.3s ease;
}

.app-details-modal.active .app-details-content {
	transform: scale(1) translateY(0);
}

.app-details-header {
	position: sticky;
	height: 80px;
	background-color: var(--gp-background);
	border-bottom: 1px solid var(--gp-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-radius: 20px 20px 0 0;
	flex-shrink: 0;
}

.app-details-header-content {
	display: flex;
	align-items: center;
	gap: 16px;
}

.app-details-logo {
	width: 48px;
	height: 48px;
	border-radius: 8px;
}

.app-details-title-section {
	flex: 1;
}

.app-details-title {
	font-family: 'Google Sans', Roboto, Arial, sans-serif;
	font-size: 18px;
	font-weight: 500;
	color: var(--gp-text-primary);
	margin: 0;
	line-height: 1.2;
}

.app-details-subtitle {
	font-family: 'Google Sans', Roboto, Arial, sans-serif;
	font-size: 14px;
	color: var(--gp-text-secondary);
	margin: 4px 0 0 0;
}

.app-details-close {
	background: none;
	border: none;
	font-size: 28px;
	color: var(--gp-text-secondary);
	cursor: pointer;
	padding: 8px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
	overflow: hidden;
}

.app-details-close:hover {
	background-color: var(--gp-divider);
}

.app-details-body {
	flex: 1;
	overflow-y: auto;
	background-color: var(--gp-background);
	padding: 24px;
}

.app-details-description {
	max-width: 600px;
	margin: 0 auto;
}

.app-details-section-title {
	font-family: 'Google Sans', Roboto, Arial, sans-serif;
	font-size: 20px;
	font-weight: 500;
	color: var(--gp-text-primary);
	margin: 32px 0 16px 0;
}

.app-details-section-title:first-child {
	margin-top: 0;
}

.app-details-info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 16px;
}

.app-details-description-text {
	font-family: Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 20px;
	color: var(--gp-text-secondary);
	letter-spacing: 0.25px;
}

.app-details-compatibility-description,
.app-details-compatibility-description-title {
	font-family: Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 20px;
	color: var(--gp-text-secondary);
	letter-spacing: 0.25px;
	margin: 0 0 24px 0;
}

.app-details-compatibility-description-wrapper {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.app-details-tags-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.app-details-tag {
	background-color: var(--gp-surface);
	color: var(--gp-text-secondary);
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-family: 'Google Sans', Roboto, Arial, sans-serif;
	border: 1px solid var(--gp-border);
}

.app-details-screenshots-wrapper {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 8px;
	margin-bottom: 24px;
}

.app-details-screenshot {
	width: 200px;
	height: 355px;
	border-radius: 12px;
	object-fit: cover;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.app-details-info-section {
	text-align: left;
}

.app-details-info-title {
	font-family: 'Google Sans', Roboto, Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	margin: 0 0 4px 0;
	letter-spacing: 0.5px;
	text-transform: capitalize;
}

.app-details-compatibility {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.app-details-compatibility-title {
	font-family: 'Google Sans', Roboto, Arial, sans-serif;
	line-height: 1.5rem;
	font-size: 1rem;
	letter-spacing: 0.00625em;
	font-weight: 500;
	color: var(--gp-text-primary);
	padding-bottom: 24px;
}

.app-details-compatibility-subtitle {
	border-color: rgb(232, 234, 237);
	padding-bottom: 24px;
	font-family: 'Google Sans', Roboto, Arial, sans-serif;
	line-height: 1.25rem;
	font-size: 0.875rem;
	letter-spacing: 0.018em;
	font-weight: 500;
	color: var(--gp-text-secondary);
}

.app-details-info-value {
	font-family: Roboto, Arial, sans-serif;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.25px;
	line-height: 20px;
	color: var(--gp-text-secondary);
	margin: 0;
}

/* ============================================
   IMAGE VIEWER MODAL
   ============================================ */

.image-viewer-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	justify-content: center;
	align-items: center;
}

.image-viewer-modal.active {
	display: flex;
}

.image-viewer-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.image-viewer-close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: white;
	font-size: 30px;
	cursor: pointer;
	z-index: 10001;
	padding: 5px 10px;
}

.image-viewer-img {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.image-viewer-nav {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	display: flex;
	justify-content: space-between;
	align-items: center;
	pointer-events: none;
}

.image-viewer-prev,
.image-viewer-next {
	background: white;
	border: none;
	color: var(--gp-text-secondary);
	font-size: 35px;
	padding: 2px 15px;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.3s ease;
	pointer-events: auto;
}

.image-viewer-prev:hover,
.image-viewer-next:hover {
	background: rgba(255, 255, 255, 0.3);
}

.image-viewer-counter {
	display: none;
}

@media (max-width: 768px) {
	.app-details-modal {
		padding: 15px;
	}

	.app-details-content {
		height: 95vh;
		max-height: none;
		border-radius: 16px;
	}

	.app-details-header {
		padding: 0 16px;
		border-radius: 16px 16px 0 0;
	}

	.app-details-body {
		padding: 0 16px;
	}

	.app-details-info-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.app-details-screenshot {
		width: 150px;
		height: 266px;
	}
}

/* Стили для отзывов */
.review-comment {
	display: block;
	margin-bottom: 24px;
}

.review-header {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: space-between;
}

.review-author-img {
	display: flex;
	align-items: center;
	gap: 8px;
}

.review-author-name {
	font-family: Roboto, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #202124;
}

.review-date-text {
	font-family: Roboto, Arial, sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #5f6368;
}

.review-author-img img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}

.review-body {
	margin-top: 8px;
	color: #5f6368;
	font-size: 14px;
	font-family: Roboto, 'Helvetica', sans-serif;
	letter-spacing: 0.2px;
	line-height: 20px;
}

.review-date {
	display: flex;
	align-items: center;
	gap: 12px;
}

.review-date p {
	color: #5f6368;
	font-size: 12px;
}

.stars-wrapper {
	height: 20px;
}

.stars-wrapper img {
	width: 12px;
	height: 12px;
}

/* Стили для ответов разработчика */
.review-answer-container {
	background-color: #f8f9fa;
	padding: 12px;
	margin: 8px;
	border-radius: 8px;
}

.review-answer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.review-answer-dev {
	font-family: Roboto, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #202124;
}

.review-answer-date {
	font-family: Roboto, Arial, sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #5f6368;
}

.review-answer {
	font-family: Roboto, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #5f6368;
	letter-spacing: 0.2px;
	line-height: 20px;
}

/* Стили для кнопок "Полезно/Не полезно" */
.description-helpers-wrapper {
	margin-top: 12px;
}

.description-useful-comment {
	font-family: Roboto, Arial, sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.3px;
	margin-top: 8px;
	margin-bottom: 5px;
	color: #9aa0a6;
}

.description-qna {
	display: flex;
	align-items: center;
	gap: 16px;
}

.qna-buttons-wrapper {
	display: flex;
	gap: 8px;
}

.qna-button {
	background: none;
	border: 1px solid #dadce0;
	border-radius: 4px;
	padding: 4px 8px;
	font-family: Roboto, Arial, sans-serif;
	font-size: 12px;
	color: #5f6368;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.qna-button:hover {
	background-color: #f8f9fa;
}

.qna-button.active {
	background-color: #1a73e8;
	color: white;
	border-color: #1a73e8;
}

/* Скроллируемый контейнер для отзывов */
.reviews-scroll-container {
	overflow-y: auto;
	overflow-x: hidden;
	margin-top: 16px;
	padding-right: 8px;
	max-height: 700px;
}

.reviews-scroll-container::-webkit-scrollbar {
	width: 0px;
	background: transparent;
}
