/* ========================================
   СОВРЕМЕННЫЕ СТИЛИ ФОРМ ДЛЯ SITEGUARDING.COM
   ======================================== */

/* ========================================
   ТЕКСТОВЫЕ ПОЛЯ (INPUT TEXT, EMAIL, ETC)
   ======================================== */
select,
textarea,
input[type="file"],
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.uneditable-input {
	display: inline-block;
	height: 38px;
	padding: 8px 12px;
	margin-bottom: 10px;
	font-size: 14px;
	line-height: 20px;
	color: #333;
	background-color: #fff;
	
	/* Современный border */
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	
	/* Многослойная тень */
	box-shadow: 
		0 2px 4px rgba(0, 0, 0, 0.04),
		0 1px 2px rgba(0, 0, 0, 0.06),
		inset 0 1px 3px rgba(0, 0, 0, 0.05);
	
	/* Плавные переходы */
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	
	vertical-align: middle;
	outline: none;
	box-sizing: border-box;
}

/* Эффект при наведении */
textarea:hover,
input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
input[type="tel"]:hover,
input[type="number"]:hover,
select:hover {
	border-color: #c8c8c8;
	box-shadow: 
		0 4px 8px rgba(0, 0, 0, 0.06),
		0 2px 4px rgba(0, 0, 0, 0.08),
		inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Эффект при фокусе */
textarea:focus,
input[type="file"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus {
	/* Зеленая тема при фокусе */
	border-color: #4B9307;
	background-color: #fafffe;
	
	/* Улучшенная тень с зеленым свечением */
	box-shadow: 
		0 0 0 3px rgba(75, 147, 7, 0.15),
		0 4px 12px rgba(75, 147, 7, 0.12),
		0 2px 4px rgba(0, 0, 0, 0.08),
		inset 0 1px 3px rgba(0, 0, 0, 0.04);
	
	outline: none;
	transform: translateY(-1px);
}

/* ========================================
   TEXTAREA
   ======================================== */
textarea {
	height: auto !important;
	min-height: 80px;
	resize: vertical;
	padding: 12px;
	font-family: inherit;
	box-sizing: border-box;
}

textarea.textarea_h {
	height: 155px;
}

textarea.textarea_h_sml {
	height: 75px;
}

/* Гарантируем одинаковую высоту для input и select */
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"] {
	height: 38px !important;
	box-sizing: border-box;
}

/* ========================================
   SELECT
   ======================================== */
select {
	height: 38px !important;
	padding: 8px 32px 8px 12px;
	background-color: #fff;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-sizing: border-box;
}

select:hover {
	background-color: #fafafa;
}

select:focus {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%234B9307' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}

select[multiple],
select[size] {
	height: auto;
	background-image: none;
}


.mod_field,
.mod_field_textarea {
	color: #fff !important;
	line-height: 36px;
	font-size: 14px;
	padding: 10px 12px !important;
	display: inline-block;
	min-height: 40px;
	width: 100%;
	
	/* Прозрачный фон с белой границей */
	background: rgba(255, 255, 255, 0.05) !important;
	border: 2px solid rgba(255, 255, 255, 0.3) !important;
	border-radius: 6px !important;
	
	/* Тень для контраста */
	box-shadow: 
		0 4px 8px rgba(0, 0, 0, 0.2),
		inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
	
	transition: all 0.3s ease;
	outline: none;
}

.mod_field_textarea {
	line-height: 20px !important;
	min-height: 100px;
}

.mod_field:hover,
.mod_field_textarea:hover {
	background: rgba(255, 255, 255, 0.08) !important;
	border-color: rgba(255, 255, 255, 0.5) !important;
	box-shadow: 
		0 6px 12px rgba(0, 0, 0, 0.25),
		inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.mod_field:focus,
.mod_field_textarea:focus {
	background: rgba(255, 255, 255, 0.1) !important;
	border-color: rgba(255, 255, 255, 0.8) !important;
	box-shadow: 
		0 0 0 3px rgba(255, 255, 255, 0.2),
		0 8px 16px rgba(0, 0, 0, 0.3),
		inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Placeholder для модульных полей */
.mod_field::placeholder,
.mod_field_textarea::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   CONTROL GROUP
   ======================================== */
.control-group {
	margin-bottom: 15px;
	transition: all 0.3s ease;
}



.control-group .help-inline,
.control-group .help-block {
	color: #666;
	font-size: 12px;
	margin-top: 6px;
	display: block;
	line-height: 1.5;
}

/* ========================================
   ERROR СОСТОЯНИЯ
   ======================================== */
.control-group.error input,
.control-group.error select,
.control-group.error textarea {
	border-color: #dc3545 !important;
	background-color: #fff5f5;
	
	box-shadow: 
		0 0 0 3px rgba(220, 53, 69, 0.1),
		0 2px 4px rgba(220, 53, 69, 0.15),
		inset 0 1px 2px rgba(220, 53, 69, 0.05);
}

.control-group.error input:focus,
.control-group.error select:focus,
.control-group.error textarea:focus {
	box-shadow: 
		0 0 0 3px rgba(220, 53, 69, 0.2),
		0 4px 8px rgba(220, 53, 69, 0.2),
		inset 0 1px 2px rgba(220, 53, 69, 0.05);
}

.control-group.error .help-inline,
.control-group.error .help-block {
	color: #dc3545;
	font-weight: 500;
}

.control-group.error label {
	color: #dc3545;
}

/* ========================================
   SUCCESS СОСТОЯНИЯ
   ======================================== */
.control-group.success input,
.control-group.success select,
.control-group.success textarea {
	border-color: #4B9307;
	background-color: #f8fff8;
}

/* ========================================
   INPUT GROUPS (с иконками)
   ======================================== */
.input-append,
.input-prepend {
	display: flex;
	align-items: stretch;
	margin-bottom: 10px;
}

.input-append input,
.input-prepend input {
	flex: 1;
	margin-bottom: 0;
}

.input-append .add-on,
.input-prepend .add-on {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
	border: 1px solid #e0e0e0;
	color: #666;
	font-size: 14px;
	
	box-shadow: 
		0 2px 4px rgba(0, 0, 0, 0.04),
		inset 0 1px 0 rgba(255, 255, 255, 0.8);
	
	transition: all 0.3s ease;
}

.input-prepend .add-on {
	border-radius: 6px 0 0 6px;
	border-right: none;
}

.input-append .add-on {
	border-radius: 0 6px 6px 0;
	border-left: none;
}

.input-prepend input {
	border-radius: 0 6px 6px 0;
}

.input-append input {
	border-radius: 6px 0 0 6px;
}

/* ========================================
   FILE UPLOAD
   ======================================== */
input[type="file"] {
	padding: 8px;
	cursor: pointer;
	border: 2px dashed #d0d0d0;
	background: #fafafa;
	border-radius: 6px;
	transition: all 0.3s ease;
}

input[type="file"]:hover {
	border-color: #4B9307;
	background: #f8fff8;
	box-shadow: 
		0 4px 8px rgba(75, 147, 7, 0.1),
		inset 0 1px 2px rgba(75, 147, 7, 0.05);
}

/* ========================================
   DATEPICKER
   ======================================== */
.js-datepicker {
	position: relative;
}

.js-datepicker input {
	padding-right: 40px;
}

.js-datepicker span.add-on {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: all 0.3s ease;
}

.js-datepicker span.add-on:hover {
	transform: translateY(-50%) scale(1.1);
}

.js-datepicker span.add-on i.icon-btn-calendar {
	width: 28px;
	height: 28px;
	opacity: 0.6;
	transition: opacity 0.3s ease;
}

.js-datepicker span.add-on:hover i.icon-btn-calendar {
	opacity: 1;
}

/* ========================================
   DISABLED СОСТОЯНИЯ
   ======================================== */
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
	background-color: #f5f5f5 !important;
	border-color: #e0e0e0 !important;
	color: #999 !important;
	cursor: not-allowed;
	opacity: 0.7;
	
	box-shadow: none !important;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */
@media (max-width: 768px) {
	input,
	textarea,
	select {
		font-size: 16px; /* Предотвращает зум на iOS */
	}
	
	.control-group-left,
	.control-group-right {
		width: 100%;
		float: none;
		margin-bottom: 15px;
	}
}

/* ========================================
   АНИМАЦИЯ PLACEHOLDER
   ======================================== */
@keyframes placeholderShimmer {
	0% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
	100% {
		opacity: 1;
	}
}

input:focus::placeholder,
textarea:focus::placeholder {
	animation: placeholderShimmer 2s ease-in-out infinite;
}

/* ========================================
   УЛУЧШЕНИЕ АВТОЗАПОЛНЕНИЯ
   ======================================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 30px white inset !important;
	box-shadow: 0 0 0 30px white inset !important;
	-webkit-text-fill-color: #333 !important;
}