/* AI Star Icon with Rainbow Animation */
.ai-star-icon {
	position: relative;
}

.ai-star-icon:hover {
	animation: ai-star-pulse 2s infinite;
	transform: scale(1.1);
}

@keyframes ai-star-pulse {
	0% { filter: brightness(1) saturate(1); }
	25% { filter: brightness(1.3) saturate(1.5) hue-rotate(45deg); }
	50% { filter: brightness(1.2) saturate(1.3) hue-rotate(90deg); }
	75% { filter: brightness(1.3) saturate(1.5) hue-rotate(135deg); }
	100% { filter: brightness(1) saturate(1) hue-rotate(180deg); }
}

/* Добавляем свечение при наведении */
.ai-star-icon:hover {
	text-shadow: 0 0 8px rgba(139, 92, 246, 0.8), 
	            0 0 16px rgba(59, 130, 246, 0.6),
	            0 0 24px rgba(6, 182, 212, 0.4);
	filter: brightness(1.3) saturate(1.2);
}

/* Modern AI Generation Popover Styles */
.ai-generation-popover-modern {
	position: relative;
}

.ai-generation-popover-modern::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), rgba(59, 130, 246, 0.02));
	border-radius: 16px;
	pointer-events: none;
}

.compact-form .ant-form-item {
	margin-bottom: 12px;
}

.compact-form .ant-form-item-label {
	padding-bottom: 4px;
}

/* File Icon Buttons Styles */
.file-icon-button {
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	border: 1px solid transparent;
}

.file-icon-button:hover {
	background-color: rgba(255, 255, 255, 0.9) !important;
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 
		0 1px 8px rgba(0, 0, 0, 0.1);
		
	transform: translateY(-1px);
}

.file-icon-button:hover .anticon[style*="#eb2f96"] {
	filter: drop-shadow(0 0 4px rgba(235, 47, 150, 0.3));
}

/* Timer pulse animation */
@keyframes pulse {
	0% { 
		opacity: 1; 
		transform: scale(1); 
	}
	50% { 
		opacity: 0.5; 
		transform: scale(1.2); 
	}
	100% { 
		opacity: 1; 
		transform: scale(1); 
	}
}

.compact-form .ant-form-item-label label {
	font-size: 14px;
	font-weight: 500;
	color: #374151;
}

.compact-form .ant-select-small .ant-select-selector,
.compact-form .ant-input-small,
.compact-form .ant-checkbox-wrapper {
	border-radius: 6px;
}

.compact-form .ant-select-small .ant-select-selector {
	border-color: rgba(139, 92, 246, 0.15);
}

/* Filter Search Width Synchronization */
.filter-form {
	width: 100%;
	min-width: 500px;
	max-width: 750px;
}

.table-filter-search-dropdown {
	width: 100% !important;
	left: 0 !important;
	right: auto !important;
}

.table-filter-search-dropdown--close-button {
	display: none !important;
	margin-bottom: 10px;
}

@media screen and (max-width: 567px) {
	.table-filter-search-dropdown {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		margin: 0 !important;
		max-height: 100% !important;
		min-height: 100% !important;
		z-index: 1001 !important;
		font-size: 16px !important;
		overflow-y: auto;
		overflow-x: hidden;
	}
	
	.filter-bottom-block {
		padding: 15px 0 !important;
		margin-top: auto !important;
	}

	.table-filter-search-dropdown--close-button {
		display: block !important;
	}
	
}


.compact-form .ant-select-small:hover .ant-select-selector {
	border-color: rgba(139, 92, 246, 0.3);
}

/* Стили для Task Manager Side Navigation */
.project-manager-more-menu-popover .ant-popover-content {
	padding: 0;
}

.project-manager-more-menu-popover .ant-popover-inner-content {
	padding: 0;
}

.project-manager-more-menu-popover .ant-menu {
	box-shadow: none;
	max-height: 400px;
	overflow-y: auto;
}

/* Стили для Task Manager Mobile Navigation */
.mobile-nav-menu .ant-collapse-ghost > .ant-collapse-item {
	border-bottom: none;
}

.mobile-nav-menu .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-header {
	padding: 8px 16px;
}

.mobile-nav-menu .ant-collapse-content-box {
	padding: 0 !important;
}

html,
body {
	/* Фиксируем ширину и предотвращаем горизонтальный скролл */
	max-width: 100vw;
	overflow-x: hidden;
}

/* Отключаем bouncing и rubber band эффект в Safari на iOS */
body {
	overscroll-behavior-x: none;
	-webkit-overflow-scrolling: touch;
}

/* Дополнительная защита от случайного зума */
* {
	-webkit-text-size-adjust: 100%;
	-moz-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

/* Отключаем автозум на input полях без изменения дизайна */

/* Стили для AI генерации изображений */
.ai-image-generation-popover {
	z-index: 1050;
}
.ai-image-generation-popover .ant-popover-title {
	padding: 15px 16px 14px;
}
.ai-image-generation-popover .ant-popover-content {
	max-width: 500px;
}

.ai-image-generation-popover .ant-popover-inner {
	padding: 0;
}

.ai-image-generation-popover .ant-form-item {
	margin-bottom: 12px;
}

.ai-image-generation-popover .ant-form-item-label > label {
	font-weight: 500;
	font-size: 13px;
}

.ai-image-generation-popover .ant-card-meta-title {
	font-size: 11px;
	text-align: center;
	margin-top: 4px;
}

.ai-image-generation-popover .ant-card-body {
	padding: 8px 4px;
}

.ai-image-generation-popover .ant-checkbox-group .ant-checkbox-wrapper {
	margin-bottom: 4px;
	font-size: 12px;
}

.ai-image-generation-popover .ant-radio-group {
	margin-bottom: 8px;
}

.ai-image-generation-popover .ant-radio-group .ant-radio-wrapper {
	font-size: 12px;
}

.ai-image-generation-popover .ant-upload.ant-upload-select-picture-card {
	width: 60px;
	height: 60px;
	margin-right: 8px;
	margin-bottom: 8px;
}

.ai-image-generation-popover .ant-upload-list-picture-card .ant-upload-list-item {
	width: 60px;
	height: 60px;
	margin-right: 8px;
	margin-bottom: 8px;
}

/* Стили для иконки AI в ячейке изображения */
.avatar-cell {
	position: relative;
}

.avatar-cell .ai-generation-icon {
	position: absolute;
	top: 2px;
	right: 2px;
	z-index: 10;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.avatar-cell:hover .ai-generation-icon {
	opacity: 1;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Firefox */
input[type="number"] {
	appearance: textfield;
}

.noselect {
	-webkit-touch-callout: none; /* iOS Safari */
	-webkit-user-select: none; /* Safari */
	-khtml-user-select: none; /* Konqueror HTML */
	-moz-user-select: none; /* Old versions of Firefox */
	-ms-user-select: none; /* Internet Explorer/Edge */
	user-select: none; /* Non-prefixed version, currently
									supported by Chrome, Edge, Opera and Firefox */
}
.ant-layout-sider-children > div > div {
	overflow: hidden !important;
}
.ant-layout-sider-children > div > div > ul {
	overflow: auto !important;
}
.ant-layout-sider-children .ant-menu > .ant-menu-item:last-of-type {
	height: auto;
}
.pointer-none {
	pointer-events: none !important;
}
.one-or-more-variation {
	background-color: #f4f4f4 !important;
}
.one-or-more-variation .ant-switch-handle::before {
	background-color: #3e79f7;
}
.ag-theme-alpine-dark .ag-input-field-input {
	background-color: #2196f31a !important;
	border: 1px solid #283142 !important;
	outline: none;
}

.variationTable div.ag-center-cols-clipper {
	min-height: auto !important ;
}

.middle .ant-switch-handle::before {
	left: -12px !important;
	right: 10px !important;
}
.analogModal .ant-modal-body {
	max-height: 500px;
	overflow: scroll;
	margin: 0;
	padding: 0;
}
.analogModal {
	margin: 0 auto;
	position: absolute;
	top: 200px;
	left: 0;
	right: 0;
}
.analog-view::-webkit-scrollbar {
	display: none;
}
.disabled-group {
	cursor: not-allowed;
}
.disabled-group > * {
	pointer-events: none;
}
.ag-cell-inline-editing {
	padding: 0 !important;
}
.ag-cell-value,
.ag-group-value {
	text-overflow: ellipsis !important;
}
input.hideBorder {
	border: 1px solid transparent !important;
	background-color: transparent !important;
}

input.hideBorder:hover {
	border: 1px solid rgb(105, 157, 255) !important;
}
.hideBorder .ant-select-selector {
	border: 1px solid transparent !important;
	background-color: transparent !important;
}

.hideBorder .ant-select-selector:hover {
	border: 1px solid rgb(105, 157, 255) !important;
}

/* iframe {
	display: none;
} */
.add-product-drawer .ant-drawer-header-title {
	display: flex;
	justify-content: flex-end;
}
.ag-watermark {
	display: none !important;
}

.customer-card-drawer.order-card .ant-drawer-body {
	padding-bottom: 0px !important;
}
.canvas-label .lower-canvas {
	background-color: white;
}

.order_header .ant-select:not(.ant-select-customize-input) .ant-select-selector {
	border: 1px solid #afbed254 !important;
	background-color: rgb(255 255 255 / 0%) !important;
}

.demo-rounding-result {
	position: absolute;
	bottom: 60px;
	right: 50px;
	font-size: 20px;
	font-weight: 600;
}
.demo-rounding-result-price {
	position: absolute;
	bottom: 26px;
	left: 180px;
	font-size: 39px;
	font-weight: 700;
}
.ant-tooltip-inner:has(.m-toolbar-container) {
	background-color: white !important;
}

body[data-theme="dark"] .m-action-container {
	color: rgb(180, 190, 210);
	background-color: rgb(61 74 98 / 63%) !important;
}
body[data-theme="dark"] .ant-tooltip-inner:has(.m-toolbar-container) {
	background-color: rgb(40, 49, 66) !important;
}

body[data-theme="dark"] .drawer-brands .drawer_brand_title {
	color: rgb(214, 215, 220);
}
body[data-theme="dark"] #p-template-section .blog-box {
	background: #4d5b75;
}
body[data-theme="dark"] #p-template-section .blog-box .title {
	color: white;
}

@media (max-width: 768px) {
	.m-action-container {
		gap: 0 !important;
	}
	.filter-form {
		width: 100% !important;
		min-width: 100% !important;
		max-width: 750px;
	}
}

/* Responsible Users Cell - Hide edit icon by default, show on hover */
.responsible-users-cell-container .responsible-edit-btn {
	opacity: 0;
	transition: opacity 0.2s ease-in-out;
}

.responsible-users-cell-container:hover .responsible-edit-btn {
	opacity: 1;
}
