/**
 * css/support-modal.css
 * Стили для модального окна поддержки
 */

/* ============================================
   МОДАЛЬНОЕ ОКНО
   ============================================ */

.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* ============================================
   КОНТЕНТ МОДАЛЬНОГО ОКНА
   ============================================ */

.modal-content {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 32px;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ============================================
   ЗАГОЛОВОК
   ============================================ */

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
}

.modal-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: var(--text-primary);
}

/* ============================================
   КНОПКА ЗАКРЫТИЯ
   ============================================ */

.modal-close {
	background: none;
	border: none;
	font-size: 28px;
	color: var(--text-secondary);
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background-color 0.15s ease;
}

.modal-close:hover {
	background-color: var(--hover-bg);
	color: var(--text-primary);
}

/* ============================================
   ПОЛЯ ФОРМЫ
   ============================================ */

.modal .form-group {
	margin-bottom: 16px;
}

.modal label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-secondary);
	margin-bottom: 6px;
}

.modal input[type="text"],
.modal input[type="email"],
.modal textarea,
.modal select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background: transparent;
	font-size: 14px;
	color: var(--text-primary);
	font-family: inherit;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

/* Кастомная стрелка для select */
.modal select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
	cursor: pointer;
}

/* Тёмная тема — светлая стрелка */
[data-theme="dark"] .modal select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.modal input[type="text"]:focus,
.modal input[type="email"]:focus,
.modal textarea:focus,
.modal select:focus {
	outline: none;
	border-color: var(--border-focus);
}

.modal textarea {
	resize: vertical;
	min-height: 100px;
}

/* ============================================
   КНОПКА ОТПРАВКИ
   ============================================ */

.support-submit-btn {
	width: 100%;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	border: 1px solid transparent;
	font-family: inherit;
	background: var(--btn-primary);
	color: #ffffff;
	margin-top: 8px;
}

.support-submit-btn:hover:not(:disabled) {
	background: var(--btn-primary-hover);
}

.support-submit-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Кнопка с индикатором загрузки */
.support-submit-btn.loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
	cursor: wait;
}

.support-submit-btn.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: support-btn-spin 0.6s linear infinite;
}

@keyframes support-btn-spin {
	to {
		transform: rotate(360deg);
	}
}

/* В тёмной теме */
[data-theme="dark"] .support-submit-btn.loading::after {
	border-color: rgba(24, 24, 27, 0.2);
	border-top-color: #18181b;
}

/* ============================================
   БЛОК УСПЕХА
   ============================================ */

#supportSuccess {
	text-align: center;
	padding: 24px 0;
}

#supportSuccess .success-icon {
	font-size: 48px;
	color: var(--success-color);
	margin-bottom: 16px;
}

#supportSuccess p {
	color: var(--text-primary);
	font-size: 15px;
	margin: 0;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 480px) {
	.modal {
		padding: 0;
		align-items: flex-end;
	}

	.modal-content {
		max-width: 100%;
		border-radius: 12px 12px 0 0;
		max-height: 85vh;
	}
}
