/* ===== COOKIE CONSENT BANNER ===== */
#cookieConsent {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
	border-top: 3px solid var(--primary-color);
	padding: 20px;
	z-index: 9999;
	box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3);
	transform: translateY(100%);
	transition: transform 0.4s ease-out;
}

#cookieConsent.show {
	transform: translateY(0);
}

.cookie-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.cookie-text {
	flex: 1;
	min-width: 300px;
}

.cookie-title {
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 8px;
}

.cookie-description {
	font-size: 14px;
	color: #b8b8b8;
	line-height: 1.5;
}

.cookie-description a {
	color: var(--primary-color);
	text-decoration: underline;
}

.cookie-description a:hover {
	color: #ff6b35;
}

.cookie-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.cookie-btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
	text-align: center;
	min-width: 120px;
}

.cookie-btn-accept {
	background: var(--primary-color);
	color: #ffffff;
}

.cookie-btn-accept:hover {
	background: #ff6b35;
	transform: translateY(-2px);
}

.cookie-btn-decline {
	background: transparent;
	color: #b8b8b8;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-decline:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.cookie-btn-settings {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-settings:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* Cookie Settings Modal */
#cookieSettingsModal {
	background-color: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(8px);
}

#cookieSettingsModal .modal-content {
	background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
	border-radius: 16px;
	max-width: 700px;
	width: 90%;
	max-height: 85vh;
	overflow-y: auto;
	position: relative;
	border: 1px solid rgba(202, 156, 81, 0.3);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	animation: modalSlideIn 0.3s ease-out;
	margin: 0 auto;
	color: #ffffff;
}

#cookieSettingsModal .modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px 32px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#cookieSettingsModal .modal-header h3 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
}

#cookieSettingsModal .modal-close {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	font-size: 18px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

#cookieSettingsModal .modal-close:hover {
	background: rgba(255, 59, 48, 0.2);
	border-color: rgba(255, 59, 48, 0.4);
	transform: scale(1.1);
}

#cookieSettingsModal .modal-body {
	padding: 24px 32px;
}

.cookie-category {
	margin-bottom: 24px;
	padding: 20px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.cookie-category-title {
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
	margin: 0;
}

.cookie-toggle {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 24px;
}

.cookie-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.cookie-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #555;
	transition: 0.3s;
	border-radius: 24px;
}

.cookie-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
}

input:checked + .cookie-slider {
	background-color: var(--primary-color);
}

input:checked + .cookie-slider:before {
	transform: translateX(26px);
}

.cookie-category-description {
	font-size: 14px;
	color: #b8b8b8;
	line-height: 1.5;
	margin: 0;
}

#cookieSettingsModal .modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 16px 32px 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== MODAL STYLES ===== */

/* Базовые стили для всех модалок */
.modal,
.portfolio-modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(5px);
	animation: modalFadeIn 0.3s ease-out;
}

.modal.show,
.portfolio-modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Анимации */
@keyframes modalFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-50px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* ===== SMS CONSENT MODAL ===== */
#consentModal {
	background-color: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(8px);
}

#consentModal .modal-content {
	background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
	border-radius: 16px;
	max-width: 600px;
	width: 90%;
	max-height: 85vh;
	overflow-y: auto;
	position: relative;
	border: 1px solid rgba(202, 156, 81, 0.3);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	animation: modalSlideIn 0.3s ease-out;
	margin: 0 auto;
	color: #ffffff;
}

#consentModal .modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px 32px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
	border-radius: 16px 16px 0 0;
}

#consentModal .modal-header h3 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#consentModal .modal-close {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	font-size: 20px;
	font-weight: 300;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

#consentModal .modal-close:hover {
	background: rgba(255, 59, 48, 0.2);
	border-color: rgba(255, 59, 48, 0.4);
	transform: scale(1.1);
	color: #ff3b30;
}

#consentModal .modal-body {
	padding: 24px 32px;
	line-height: 1.6;
	background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

#consentModal .modal-body h4 {
	color: var(--primary-color);
	font-size: 18px;
	font-weight: 600;
	margin: 20px 0 12px 0;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#consentModal .modal-body h4:first-child {
	margin-top: 0;
}

#consentModal .modal-body p {
	color: #cccccc;
	font-size: 15px;
	margin-bottom: 16px;
	line-height: 1.6;
}

#consentModal .modal-body ul {
	color: #e0e0e0;
	margin: 12px 0;
	padding-left: 20px;
}

#consentModal .modal-body li {
	color: #e0e0e0;
	margin: 10px 0;
	font-size: 14px;
	line-height: 1.5;
}

#consentModal .modal-body strong {
	color: var(--primary-color);
	font-weight: 600;
}

#consentModal .modal-note {
	background: linear-gradient(135deg, rgba(202, 156, 81, 0.1) 0%, rgba(202, 156, 81, 0.05) 100%);
	padding: 16px;
	border-radius: 8px;
	border-left: 4px solid var(--primary-color);
	margin-top: 20px;
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#consentModal .modal-note strong {
	color: var(--primary-color);
}

#consentModal .modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 16px 32px 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
	border-radius: 0 0 16px 16px;
}

#consentModal .modal-btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	min-width: 120px;
}

#consentModal .modal-btn-secondary {
	background: rgba(255, 255, 255, 0.1);
	color: #cccccc;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

#consentModal .modal-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#consentModal .modal-btn-primary {
	background: linear-gradient(135deg, var(--primary-color) 0%, #b8935a 100%);
	color: #ffffff;
	border: 1px solid var(--primary-color);
}

#consentModal .modal-btn-primary:hover {
	background: linear-gradient(135deg, #b8935a 0%, var(--primary-color) 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(202, 156, 81, 0.4);
}

/* ===== CONTACT MODAL ===== */
#contactModal {
	background-color: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(8px);
}

#contactModal .modal-content {
	background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
	border-radius: 16px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	z-index: 10001;
	animation: modalSlideIn 0.3s ease-out;
}

#contactModal .modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px 32px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#contactModal .modal-header h3 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
}

#contactModal .modal-close {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	font-size: 20px;
	font-weight: 300;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

#contactModal .modal-close:hover {
	background: rgba(255, 59, 48, 0.2);
	border-color: rgba(255, 59, 48, 0.4);
	transform: scale(1.1);
}

#contactModal .modal-body {
	padding: 0;
}

#contactModal .modal-body .contact-form-wrapper {
	background: transparent;
	padding: 32px;
	border-radius: 0;
	max-width: none;
	width: 100%;
	margin: 0;
}

#contactModal .modal-body .contact-form-wrapper .form-input,
#contactModal .modal-body .contact-form-wrapper .form-textarea {
	background: #2a2a2a;
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

#contactModal .modal-body .contact-form-wrapper .form-input::placeholder,
#contactModal .modal-body .contact-form-wrapper .form-textarea::placeholder {
	color: #888;
	font-weight: 400;
}

#contactModal .modal-body .contact-form-wrapper .form-input:focus,
#contactModal .modal-body .contact-form-wrapper .form-textarea:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 2px rgba(202, 156, 81, 0.2);
}

#contactModal .modal-body .form-description {
	color: #b8b8b8;
	text-align: left;
}

#contactModal .modal-body .form-checkbox label {
	color: #b8b8b8;
}

#contactModal .modal-body .consent-link {
	color: var(--primary-color);
}

#contactModal .modal-body .consent-link:hover {
	color: #ff6b35;
}

/* ===== PORTFOLIO MODAL ===== */
.portfolio-modal .modal-content {
	background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
	border-radius: 12px;
	max-width: 900px;
	width: 95%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	border: 1px solid rgba(202, 156, 81, 0.2);
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
	animation: modalSlideIn 0.3s ease-out;
}

.portfolio-modal .modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 30px;
	
	background: #333333;
	border-radius: 12px 12px 0 0;
}

.portfolio-modal .modal-header h3 {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #ffffff;
}

.portfolio-modal .modal-close {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	font-size: 18px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.portfolio-modal .modal-close:hover {
	background: rgba(255, 59, 48, 0.2);
	border-color: rgba(255, 59, 48, 0.4);
	transform: scale(1.1);
}

/* ===== ОБЩИЕ СТИЛИ ===== */
.consent-link {
	color: var(--primary-color);
	text-decoration: underline;
	cursor: pointer;
	transition: color 0.3s ease;
}

.consent-link:hover {
	color: var(--primary-color);
}

/* ===== EMAIL VERIFICATION MODAL ===== */
#formVerificationModal {
	background-color: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(8px);
}

#formVerificationModal .modal-content {
	background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
	border-radius: 16px;
	max-width: 500px;
	width: 90%;
	position: relative;
	border: 1px solid rgba(202, 156, 81, 0.3);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	animation: modalSlideIn 0.3s ease-out;
	margin: 0 auto;
	color: #ffffff;
	padding: 0;
}

#formVerificationModal .modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #ffffff;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

#formVerificationModal .modal-close:hover {
	background: rgba(255, 59, 48, 0.2);
	border-color: rgba(255, 59, 48, 0.4);
	transform: scale(1.1);
}

#formVerificationModal .modal-header {
	padding: 30px 30px 20px;
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#formVerificationModal .modal-title {
	margin: 0 0 15px 0;
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
}

#formVerificationModal .modal-subtitle {
	margin: 0;
	font-size: 15px;
	color: #b8b8b8;
	line-height: 1.6;
}

#formVerificationModal .modal-subtitle strong {
	color: var(--primary-color);
	font-weight: 600;
	display: inline;
}

#formVerificationModal .modal-body {
	padding: 30px;
}

#formVerificationModal .verification-code-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

#formVerificationModal .form-label {
	font-size: 14px;
	color: #b8b8b8;
	text-align: center;
	margin: 0;
}

#formVerificationModal .verification-code-inputs {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 10px 0;
}

#formVerificationModal .verification-code-input {
	width: 50px;
	height: 50px;
	text-align: center;
	font-size: 24px;
	font-weight: 600;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.05);
	color: #ffffff;
	transition: all 0.3s ease;
}

#formVerificationModal .verification-code-input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(202, 156, 81, 0.2);
	background: rgba(255, 255, 255, 0.08);
}

#formVerificationModal .verification-error {
	color: #ff6b6b;
	font-size: 14px;
	text-align: center;
	margin: 10px 0 0;
	padding: 10px;
	background: rgba(255, 107, 107, 0.1);
	border-radius: 8px;
	border-left: 3px solid #ff6b6b;
}

#formVerificationModal .verification-timer {
	text-align: center;
	color: #b8b8b8;
	font-size: 14px;
}

#formVerificationModal .verification-timer strong {
	color: var(--primary-color);
	font-weight: 600;
}

#formVerificationModal .modal-footer {
	display: flex;
	justify-content: center;
	gap: 12px;
	padding: 20px 30px 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#formVerificationModal .modal-btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	min-width: 140px;
}

#formVerificationModal .modal-btn-secondary {
	background: rgba(255, 255, 255, 0.1);
	color: #cccccc;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

#formVerificationModal .modal-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	transform: translateY(-1px);
}

#formVerificationModal .modal-btn-primary {
	background: linear-gradient(135deg, var(--primary-color) 0%, #b8935a 100%);
	color: #ffffff;
	border: 1px solid var(--primary-color);
}

#formVerificationModal .modal-btn-primary:hover {
	background: linear-gradient(135deg, #b8935a 0%, var(--primary-color) 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(202, 156, 81, 0.4);
}

/* Скрываем body overflow когда модальное окно открыто */
body.modal-open {
	overflow: hidden !important;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
	/* SMS Modal */
	#consentModal .modal-content {
		width: 95%;
		max-height: 90vh;
		margin: 20px;
	}

	#consentModal .modal-header,
	#consentModal .modal-body,
	#consentModal .modal-footer {
		padding-left: 20px;
		padding-right: 20px;
	}

	#consentModal .modal-header h3 {
		font-size: 20px;
	}

	#consentModal .modal-footer {
		flex-direction: column;
		gap: 8px;
	}

	#consentModal .modal-btn {
		width: 100%;
		min-width: auto;
	}

	#consentModal .modal-body {
		padding: 20px;
	}

	#consentModal .modal-body h4 {
		font-size: 16px;
	}

	#consentModal .modal-body p,
	#consentModal .modal-body li {
		font-size: 14px;
	}

	/* Contact Modal */
	#contactModal .modal-content {
		width: 95%;
		max-height: 90vh;
		margin: 20px;
	}

	#contactModal .modal-header,
	#contactModal .modal-body .contact-form-wrapper {
		padding-left: 20px;
		padding-right: 20px;
	}

	#contactModal .modal-header h3 {
		font-size: 20px;
	}

	/* Portfolio Modal */
	.portfolio-modal .modal-content {
		width: 98%;
		max-height: 95vh;
		margin: 10px;
	}

	.portfolio-modal .modal-header {
		padding: 15px 20px;
	}

	.portfolio-modal .modal-header h3 {
		font-size: 18px;
	}
	
	/* Email Verification Modal */
	#formVerificationModal .modal-content {
		width: 95%;
		max-width: 95%;
	}
	
	#formVerificationModal .modal-header {
		padding: 25px 20px 15px;
	}
	
	#formVerificationModal .modal-title {
		font-size: 20px;
	}
	
	#formVerificationModal .modal-subtitle {
		font-size: 14px;
	}
	
	#formVerificationModal .modal-body {
		padding: 20px;
	}
	
	#formVerificationModal .verification-code-input {
		width: 45px;
		height: 45px;
		font-size: 20px;
	}
	
	#formVerificationModal .modal-footer {
		flex-direction: column;
		gap: 10px;
	}
	
	#formVerificationModal .modal-btn {
		width: 100%;
		min-width: auto;
	}
}

@media (max-width: 480px) {
	#consentModal .modal-body h4 {
		font-size: 15px;
	}

	#consentModal .modal-body p,
	#consentModal .modal-body li {
		font-size: 13px;
	}

	#consentModal .modal-btn {
		padding: 10px 16px;
		font-size: 13px;
	}
}

/* Мобильная адаптация для Cookie Consent */
@media (max-width: 768px) {
	.cookie-content {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.cookie-text {
		min-width: auto;
		margin-bottom: 16px;
	}

	.cookie-buttons {
		justify-content: center;
	}

	.cookie-btn {
		flex: 1;
		min-width: 100px;
	}

	#cookieSettingsModal .modal-content {
		width: 95%;
		margin: 20px;
	}

	#cookieSettingsModal .modal-header,
	#cookieSettingsModal .modal-body,
	#cookieSettingsModal .modal-footer {
		padding-left: 20px;
		padding-right: 20px;
	}

	.cookie-category-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}