/* CSS Document */

.input-label {
	font-weight: 500;
}

.input-field {
	padding: 3px 5px;
	border: 1px solid #ccc;
	border-radius: 3px;
}
	
.input-field:focus {
    outline: 2px solid transparent; 
    outline-offset: 2px;
}
	
.title_form {
	background: linear-gradient(135deg, #6c82e6 0%, #676cae 100%);
	color: white;
	width: 100%;
    box-sizing: border-box;
	margin-right: 15px;
}
	
.cell_input {
	width: 90%;
	text-align: center;
}
	
.flex_row, .flex_column {
	display: flex;
	padding: 3px;
}

.flex_column {
  	flex-direction: column;
}
	
.flex_row {
  	flex-direction: row;
}
	
.center {
	justify-content: center;
  	align-items: center;
}

.backgorund_1 {
	border-radius: 4px 0px 0px 4px;
  	background-color: #dbe7ea;
}

.backgorund_2 {
	border-radius: 0px 4px 4px 0px;
  	background-color: #dadedf;
	margin-left: 2px;
}
	
.twenty {
	width: 20%;
}
	
.eighty {
	width: 80%;
}

.table_title{
	font-size: 1.1em;
	justify-content: center !important;
	background-color: #b6baf0;
	border-left: 1px solid white;
	border-right: 1px solid white;
	color: #4b3333;
}

.title_container{
	margin-top: 5px;
	padding-left: 3px;
 	padding-right: 10px;
}
	
.flex-table {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.row {
	display: flex;
}

.cell_1 {
	flex: 1; 
	padding: 3px;
	box-sizing: border-box;
}
	
.cell_2 {
	flex: 2; 
	padding: 3px;
	box-sizing: border-box;
}
	
.flex_row_container {
	margin-top: 10px;
	padding: 3px;
}
	
.row_top_border {
	border-top: 1px solid #cec7c7;
}
	
.cell_half_border_1, .cell_half_border_2 {
  	border-bottom: 1px solid #d3c9c9;
}

.cell_half_border_1 {
  	border-right: 1px solid #d3c9c9;
}
	
.title_2{
	text-align: center;
  	font-size: 1.2rem;
  	padding-bottom: 10px;
}

.title_3{
	text-align: left;
	font-size: 1.1rem;
	padding-bottom: 3px;
}
	
.button_1, .button_2 {
    /* Основные стили */
	margin-top: 5px;
  	margin-left: 5px;
	padding: 6px 12px;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;

	/* Начальная тень */
	box-shadow: 0 4px 3px rgba(102, 126, 234, 0.5);

	/* Дополнительные эффекты */
	position: relative;
	overflow: hidden;
}

.button_1 {
	background: #666e93;
}
	
.button_2 {
	background: #f26a41;
}

/* Эффект при наведении */
.button_1:hover, .button_2:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 6px rgba(102, 126, 234, 0.7);
}

/* Состояние при нажатии */
.button_1:active, .button_2:active {
	transform: translateY(1px);
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

input[disabled], button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #cccccc;
}
	
.kp_block_table {
	flex-wrap: wrap;
	width: 100%;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 4px;
}

.hidden {
	display: none !important;
}

.flex {
	display: flex;
}

.block {
	display: block;
}

/* Заголовок блока */
.kp_block_title {
	display: flex;
	align-items:center;
	width: 100%;
	padding: 3px 6px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	font-weight: 600;
	font-size: 16px;
	border-bottom: 1px solid #e0e0e0;
}
	
.kp_block_title > div {
	display: flex;
}
	
.kp_block_comment{
	align-items:flex-start;
	color: white;
	font-weight: 500;
	font-size: 14px;
	background-color:grey;
	width: 100%;
	padding: 2px 5px 2px 5px;
}

.kp_block_comment > input {
	width: 90%;
	background-color:#d3dfec;
}

/* Общие стили для всех колонок */
.data-row > div {
	padding: 3px 3px;
	display: flex;
	align-items: center;
	min-height: 25px;
	box-sizing: border-box;
}

/* Заголовки колонок (первая строка) */
.data-row > div:nth-child(-n+7) {
	background-color: #f8f9fa;
	font-weight: 600;
	color: #333;
}
	
.data-row > div:nth-child(-n+8){
	border-bottom: 1px solid #667eea;
}
	
.data-row > div:nth-child(-n+7) {
	border-right: 1px solid #ddc3c3;
}

.kp_flex_container{
	max-height: 80vh;
	overflow-x: hidden;
	overflow-y: auto;
	padding-right: 10px;
}
/* Размеры колонок согласно требованиям */
.col_1 { width: 3%; }
.col_2 { width: 52%; }
.col_3 { width: 5%; }
.col_4 { width: 13%; }
.col_5 { width: 4%; }
.col_6 { width: 8%; }
.col_7 { width: 13%; }
.col_8 { width: 2%; }

.col_7_8 { width: 15%; }
.col_3_4_5 { width: 22%; }

/* Выравнивание содержимого */
.col_1, .col_3, .col_4, .col_5, .col_6, .col_7_8, .col_8, .col_10 {
	justify-content: center;
	text-align: center;
}

.col_2, .col_7 {
	justify-content: flex-start;
	text-align: left;
}

/* Стили для строк с данными (будущие строки) */
.kp_block_table .data-row {
	width: 100%;
	border-bottom: 1px solid #f0f0f0;
}

.kp_block_table .data-row:last-child {
	border-bottom: none;
}

.kp_block_table .data-row:hover {
	background-color: #f8f9ff;
}

/* Стили для кнопки удаления в col_8 */
.col_8 {
	color: #ff4757;
	cursor: pointer;
	transition: all 0.3s ease;
}

.col_8:hover {
	background-color: #ff4757;
	color: white;
	transform: scale(1.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
	.kp_block_table {
		flex-direction: column;
	}

	.kp_block_table {
		width: 100% !important;
		justify-content: space-between;
		padding: 10px 16px;
	}

	.kp_block_table > div::before {
		content: attr(class);
		font-weight: 600;
		color: #667eea;
		text-transform: capitalize;
	}
}
	
.input-with-menu {
	position: relative;
	display: flex;
	width: 85%;
}

.article-field {
	position: relative;
  	display: inline-block;
  	width: 15%;
  	margin-left: 5px;
  	font-size: 0.9em;
  	white-space: nowrap;
  	overflow: hidden;
  	text-overflow: ellipsis;
}

.article-field:hover {
    overflow: visible; 
    white-space: normal; 
}

.menu-trigger {
	background: #d3dfec;
	border: 1px solid #ced4da;
	border-left: none;
	border-radius: 0 4px 4px 0;
	padding: 2px 12px;
	cursor: pointer;
	color: #6c757d;
}

.menu-trigger:hover {
	background: #e9ecef;
}

.form-input {
	flex: 1;
	border: 1px solid #ced4da;
	padding: 2px 6px;
	outline: none;
}

.form-input_change {
	flex: 2 !important;
}

.total-price {
	flex: 1;
	padding: 2px 6px;
	outline: none;
	text-align: left;
}

.total-price_change {
	flex: 2 !important;
}

.rub_price {
	font-weight: 100;
	color: #5f5fcc;
}
	
.form_with_button {
	border-radius: 4px 0 0 4px;
}
	
.menu-trigger_2 {
	background: #f8f9fa;
	border: 1px solid #ced4da;
	border-left: none;
	border-radius: 0 4px 4px 0;
	padding: 8px 0px;
	cursor: pointer;
	color: #6c757d;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 40px;
}

.rev_arrows {
	margin-left: 10px;
}

.fa-chevron-up:hover, .fa-chevron-down:hover {
	color: red;
}

.menu-trigger i {
	font-size: 12px;
	line-height: 1;
}
	
.discount_block {
	display: flex;
  	margin-top: 5px;
  	margin-left: 20px;
}
	
.discount_block > input {
	width: 5em;
}
	
#add_block{
	margin-right: 30px;
}


/*Блок с ошибкой*/

.alert-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.notice-alert {
	z-index: 900;
}

.error-alert {
	z-index: 1000;
}

.alert-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s;
}

.alert-header, .add-block-header {
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-header {
    background-color: #f44336;
}

.add-block-header {
	background-color: #3d7ad9;
}

.alert-header.warning {
    background-color: #ff9800;
}

.alert-header.success {
    background-color: #4CAF50;
}

.alert-header.info {
    background-color: #2196F3;
}

.alert-title {
    font-weight: bold;
    font-size: 18px;
}

.alert-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    opacity: 0.8;
}

.alert-body {
    padding: 20px;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
	text-align: center;
}

.alert-body .input-field {
	width: 100%;
	border: 1px solid #8f8080 !important;
}
.alert-footer {
    padding: 0 20px 20px 20px;
    text-align: right;
}

.alert-btn, .add-block-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.alert-btn {
	background-color: #f44336;
}

.add-block-button {
	background-color: #369bf4;;
}


.alert-btn:hover {
    background-color: #d32f2f;
}

.add-block-button:hover {
    background-color: #297bc4;
}

.alert-btn.warning {
    background-color: #ff9800;
}

.alert-btn.warning:hover {
    background-color: #f57c00;
}

.alert-btn.success {
    background-color: #4CAF50;
}

.alert-btn.success:hover {
    background-color: #45a049;
}

.alert-btn.info {
    background-color: #2196F3;
}

.alert-btn.info:hover {
    background-color: #0b7dda;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
opacity: 0;
transform: translateY(-50px);
    }
    to { 
opacity: 1;
transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 480px) {
    .alert-content {
margin: 20% auto;
width: 95%;
    }
    
    .alert-body {
padding: 15px;
    }
    
    .alert-footer {
padding: 0 15px 15px 15px;
    }
}

.collapsible {
    transition: height 0.3s ease-in-out;
    overflow: hidden;
}

.pointer {
	cursor: pointer;
}

.bottom_kp_buttons {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
	margin-left: 10px;
}

#save_kp:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.saveMessage {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    animation: fadeIn 0.3s;
}

.saveMessage.loading {
    background: #e3f2fd;
    color: #1976d2;
}

.saveMessage.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.saveMessage.error {
    background: #ffebee;
    color: #c62828;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    pointer-events: all;
}

.controlButtons div{
	margin-top: 15px;
}

.select_field {
	min-width: 190px;
}

.kpXlsFormInput {
	flex-wrap: wrap;
	justify-content: space-around;
}

.kpXlsFormInput div {
	width: 50%;
  	text-align: left;
}

.discountButtons {
	width: 100%;
}

.main_menu {
    text-align: center;
    padding: 2px 0;
    background-color: #2d5f7e;  /* Синий фон */
    border-radius: 30px; /* Сильно скругленные углы */
    max-width: 800px;     /* Ограничиваем ширину */
    margin: 2px auto;     /* Центрируем сам блок */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Легкая тень */
    transition: all 0.3s ease;    /* Плавная анимация всего блока */
}

.main_menu:hover {
    background-color: #1e4a66;    /* Темнее при наведении на весь блок */
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transform: scale(1.02);/* Чуть увеличиваем */
}

.main_menu a {
    margin: 0 15px;
    text-decoration: none;
    color: white;  /* Белые буквы */
    font-size: 16px;
    font-weight: 500;
    padding: 4px 16px;      /* Добавляем отступы для ссылок */
    border-radius: 20px;     /* Скругление у ссылок */
    transition: all 0.3s ease;       /* Анимация для ссылок */
    display: inline-block;    /* Чтобы padding работал */
}

/* Анимация при наведении на ссылки */
.main_menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);  /* Полупрозрачный белый */
    transform: translateY(-2px);  /* Подпрыгивание вверх */
    color: #ffffff;
}

/* Дополнительно: активная ссылка */
.main_menu a:active {
    transform: translateY(0);  /* Возврат при клике */
}