/* ============================================================================
 * DOLIVEN UI - Universal Drag & Drop Catalog Drawer & Interactive Controls
 * Harmonized with 3D logo: Navy #1E2D45 | Cyan #1E9AD6 | Amber #E5901A | Magenta #B0287A
 * ============================================================================ */

/* Floating trigger tab on right edge of editable documents */
.doliven-dnd-fab {
	position: fixed;
	right: 0;
	top: 42%;
	z-index: 1040;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px 12px 14px;
	background: linear-gradient(135deg, #1E2D45 0%, #1E9AD6 100%);
	color: #FFFFFF !important;
	border: none;
	border-radius: 14px 0 0 14px;
	box-shadow: -4px 6px 20px rgba(30, 45, 69, 0.28);
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.doliven-dnd-fab:hover {
	transform: translateX(-4px);
	box-shadow: -6px 8px 26px rgba(30, 154, 214, 0.4);
}
.doliven-dnd-fab .doliven-fab-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #E5901A;
	box-shadow: 0 0 8px #E5901A;
}

/* Right slide-over catalog drawer */
.doliven-dnd-drawer {
	position: fixed;
	top: 52px;
	right: -390px;
	width: 370px;
	max-width: 92vw;
	height: calc(100vh - 52px);
	background: #FFFFFF;
	border-left: 1px solid #E2E8F0;
	box-shadow: -10px 0 36px rgba(30, 45, 69, 0.18);
	z-index: 1050;
	display: flex;
	flex-direction: column;
	transition: right 0.26s cubic-bezier(0.22, 1, 0.36, 1);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.doliven-dnd-drawer.is-open {
	right: 0;
}

body.doliven-drawer-open div#id-right {
	padding-right: 375px;
	transition: padding-right 0.26s ease;
}
@media (max-width: 1180px) {
	body.doliven-drawer-open div#id-right {
		padding-right: 0;
	}
}

.doliven-dnd-header {
	background: linear-gradient(135deg, #1E2D45 0%, #243857 100%);
	color: #FFFFFF;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 3px solid #1E9AD6;
}
.doliven-dnd-header-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
}
.doliven-dnd-close {
	background: rgba(255, 255, 255, 0.14);
	color: #FFFFFF;
	border: none;
	border-radius: 8px;
	width: 30px;
	height: 30px;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
}
.doliven-dnd-close:hover {
	background: rgba(176, 40, 122, 0.85);
}

.doliven-dnd-searchbox {
	padding: 12px 14px 8px;
	background: #F8FAFC;
	border-bottom: 1px solid #E2E8F0;
}
.doliven-dnd-searchbox input {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border-radius: 10px !important;
	border: 1.5px solid #CBD5E1 !important;
	font-size: 13px;
}
.doliven-dnd-tabs {
	display: flex;
	gap: 5px;
	margin-top: 9px;
	flex-wrap: wrap;
}
.doliven-dnd-tab {
	padding: 5px 10px;
	border-radius: 999px;
	border: 1px solid #CBD5E1;
	background: #FFFFFF;
	color: #475569;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
}
.doliven-dnd-tab.is-active {
	background: #1E9AD6;
	border-color: #1E9AD6;
	color: #FFFFFF;
}
.doliven-dnd-tab[data-cat="workshop"].is-active {
	background: #E5901A;
	border-color: #E5901A;
}

.doliven-dnd-hint {
	padding: 7px 14px;
	font-size: 11px;
	color: #64748B;
	background: #F1F5F9;
	border-bottom: 1px solid #E2E8F0;
}

.doliven-dnd-list {
	flex: 1;
	overflow-y: auto;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Draggable Product / Service / Workshop Card */
.doliven-dnd-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 11px;
	background: #FFFFFF;
	border: 1.5px solid #E2E8F0;
	border-left: 4px solid #1E9AD6;
	border-radius: 10px;
	cursor: grab;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	user-select: none;
}
.doliven-dnd-card[data-item-type="service"] {
	border-left-color: #B0287A;
}
.doliven-dnd-card[data-item-type="repairorder"] {
	border-left-color: #E5901A;
	background: #FFFBF5;
}
.doliven-dnd-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(30, 45, 69, 0.1);
	border-color: #1E9AD6;
}
.doliven-dnd-card.is-dragging {
	opacity: 0.55;
	cursor: grabbing;
	transform: scale(0.98);
}

.doliven-dnd-thumb {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: #E8F5FC;
	color: #1E9AD6;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	flex-shrink: 0;
	overflow: hidden;
}
.doliven-dnd-card[data-item-type="service"] .doliven-dnd-thumb {
	background: #FCEBF5;
	color: #B0287A;
}
.doliven-dnd-card[data-item-type="repairorder"] .doliven-dnd-thumb {
	background: #FEF4E4;
	color: #E5901A;
}

.doliven-dnd-meta {
	flex: 1;
	min-width: 0;
}
.doliven-dnd-ref {
	font-size: 11px;
	font-weight: 700;
	color: #64748B;
	text-transform: uppercase;
}
.doliven-dnd-label {
	font-size: 13px;
	font-weight: 600;
	color: #1E2D45;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.doliven-dnd-bottom {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	font-size: 11px;
}
.doliven-dnd-price {
	font-weight: 800;
	color: #1E2D45;
}
.doliven-dnd-stock {
	padding: 2px 7px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 10px;
	background: #DCFCE7;
	color: #15803D;
}
.doliven-dnd-stock.is-low {
	background: #FEF3C7;
	color: #B45309;
}
.doliven-dnd-stock.is-zero {
	background: #FCE7F3;
	color: #9D174D;
}

.doliven-dnd-quickadd {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	border: none;
	background: #E8F5FC;
	color: #1E9AD6;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.15s ease, color 0.15s ease;
}
.doliven-dnd-quickadd:hover {
	background: #1E9AD6;
	color: #FFFFFF;
}

/* Highlighted Drop Zone injected onto editable document */
.doliven-dropzone {
	margin: 14px 0;
	padding: 18px 20px;
	border: 2px dashed #1E9AD6;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(232, 245, 252, 0.72) 0%, rgba(248, 250, 252, 0.9) 100%);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	transition: all 0.2s ease;
}
.doliven-dropzone.is-over {
	border-color: #E5901A;
	background: linear-gradient(135deg, rgba(254, 244, 228, 0.95) 0%, rgba(232, 245, 252, 0.95) 100%);
	transform: scale(1.01);
	box-shadow: 0 0 0 4px rgba(229, 144, 26, 0.22);
}
.doliven-dropzone-text {
	display: flex;
	align-items: center;
	gap: 12px;
}
.doliven-dropzone-icon {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: #1E9AD6;
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
}
.doliven-dropzone.is-over .doliven-dropzone-icon {
	background: #E5901A;
}
.doliven-dropzone h4 {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #1E2D45;
}
.doliven-dropzone p {
	margin: 2px 0 0;
	font-size: 12px;
	color: #64748B;
}

/* Drop highlight on the entire lines table too */
table#tablelines.doliven-table-dragover {
	outline: 3px dashed #E5901A !important;
	outline-offset: 4px;
	background: rgba(254, 244, 228, 0.35) !important;
}

/* Quantity quick-bar inside drawer */
.doliven-dnd-qtybar {
	padding: 10px 14px;
	border-top: 1px solid #E2E8F0;
	background: #F8FAFC;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	color: #1E2D45;
	font-weight: 600;
}
.doliven-dnd-qtybar input {
	width: 68px;
	text-align: center;
	font-weight: 700;
}

/* Toast notifications */
.doliven-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9999;
	padding: 12px 18px;
	border-radius: 10px;
	background: #1E2D45;
	color: #FFFFFF;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 12px 30px rgba(20, 32, 51, 0.35);
	border-left: 4px solid #1E9AD6;
	animation: dolivenToastIn 0.22s ease;
}
.doliven-toast.is-success { border-left-color: #16A34A; }
.doliven-toast.is-error   { border-left-color: #B0287A; }
@keyframes dolivenToastIn {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}
