/**
 * Singo Tools - Price List Off-Canvas Drawer Styles
 * Brand Colors: #ad6141 / #b16241
 * 100% Native RTL, Zero External Assets, Inherited Fonts
 */

:root {
	--singo-offcanvas-primary: #ad6141;
	--singo-offcanvas-primary-hover: #8f4b2f;
	--singo-offcanvas-bg-tint: rgba(173, 97, 65, 0.1);
	--singo-offcanvas-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.18);
}

/* 1. Backdrop Overlay */
#singo-price-list-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(15, 23, 42, 0.5);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	z-index: 999998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: none;
}

#singo-price-list-backdrop.singo-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* 2. Off-Canvas Container */
#singo-price-list-offcanvas {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 440px;
	max-width: 92vw;
	height: 100vh;
	height: 100dvh;
	background: #ffffff;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	box-shadow: -10px 0 35px rgba(15, 23, 42, 0.15);
	transform: translateX(100%);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.35s;
	direction: rtl;
	text-align: right;
	font-family: inherit !important;
	box-sizing: border-box;
	overflow: hidden;
}

#singo-price-list-offcanvas * {
	box-sizing: border-box;
	font-family: inherit !important;
}

#singo-price-list-offcanvas.singo-active {
	transform: translateX(0);
	opacity: 1;
	visibility: visible;
}

/* Prevent body scroll when drawer is open */
body.singo-offcanvas-open {
	overflow: hidden !important;
}

/* 3. Off-Canvas Header */
.singo-offcanvas-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 22px;
	background: #ffffff;
	border-bottom: 1px solid #f1f5f9;
	flex-shrink: 0;
	position: relative;
	gap: 12px;
}

.singo-offcanvas-title-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.singo-offcanvas-title-icon {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: var(--singo-offcanvas-bg-tint);
	color: var(--singo-offcanvas-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.singo-offcanvas-title-icon svg {
	width: 22px;
	height: 22px;
	display: block;
}

.singo-offcanvas-title-texts h3 {
	margin: 0 0 3px 0 !important;
	font-size: 16.5px !important;
	font-weight: 800 !important;
	color: #0f172a !important;
	line-height: 1.3 !important;
}

.singo-offcanvas-title-texts span {
	font-size: 11.5px;
	color: #64748b;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.singo-offcanvas-close-btn {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #64748b;
	transition: all 0.15s ease;
	flex-shrink: 0;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1 !important;
}

.singo-offcanvas-close-btn:hover {
	background: #fee2e2;
	color: #ef4444;
	border-color: #fca5a5;
	transform: scale(1.05);
}

.singo-offcanvas-close-btn svg {
	width: 18px;
	height: 18px;
}

/* 4. Off-Canvas Body (Scrollable) */
.singo-offcanvas-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.singo-offcanvas-body::-webkit-scrollbar {
	width: 5px;
}
.singo-offcanvas-body::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

/* Intro Description Card */
.singo-offcanvas-intro-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 13px;
	line-height: 1.7;
	color: #475569;
}

/* Category Picker Section */
.singo-offcanvas-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 10px;
}

.singo-offcanvas-section-title svg {
	color: var(--singo-offcanvas-primary);
	width: 16px;
	height: 16px;
}

/* Combobox in Off-Canvas */
.singo-offcanvas-cat-wrap {
	position: relative;
	width: 100%;
}

.singo-offcanvas-cat-trigger {
	width: 100% !important;
	min-height: 48px !important;
	background: var(--singo-offcanvas-primary, #00458c) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	border-radius: 9px !important;
	padding: 8px 14px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	text-align: right !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
	color: #ffffff !important;
}

.singo-offcanvas-cat-trigger:hover,
.singo-offcanvas-cat-trigger:focus {
	filter: brightness(1.08);
	border-color: rgba(255, 255, 255, 0.4) !important;
	outline: none !important;
}

.singo-offcanvas-cat-trigger.singo-is-open {
	border-color: rgba(255, 255, 255, 0.6) !important;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25) !important;
}

.singo-offcanvas-cat-trigger-content {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.singo-offcanvas-cat-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ffffff !important;
	flex-shrink: 0;
	display: inline-block;
}

.singo-offcanvas-cat-label {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

.singo-offcanvas-cat-count-badge {
	font-size: 11px !important;
	background: #ffffff !important;
	color: var(--singo-offcanvas-primary, #00458c) !important;
	padding: 2px 8px !important;
	border-radius: 12px !important;
	font-weight: 700 !important;
	flex-shrink: 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.singo-offcanvas-cat-chevron {
	width: 16px !important;
	height: 16px !important;
	color: #ffffff !important;
	transition: transform 0.2s ease !important;
	flex-shrink: 0 !important;
}

.singo-offcanvas-cat-trigger.singo-is-open .singo-offcanvas-cat-chevron {
	transform: rotate(180deg) !important;
}

/* Category Dropdown Listbox */
.singo-offcanvas-cat-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	box-shadow: var(--singo-offcanvas-shadow);
	z-index: 1000;
	max-height: 280px;
	overflow: hidden;
	display: none;
	flex-direction: column;
}

.singo-offcanvas-cat-search-box {
	padding: 8px 12px;
	border-bottom: 1px solid #f1f5f9;
	background: #fafafa;
	display: flex;
	align-items: center;
	gap: 8px;
}

.singo-offcanvas-cat-search-box input {
	width: 100%;
	border: none !important;
	background: transparent !important;
	font-size: 12.5px;
	outline: none !important;
	box-shadow: none !important;
	padding: 4px 0 !important;
	color: #1e293b;
	margin: 0 !important;
}

.singo-offcanvas-cat-list {
	overflow-y: auto;
	max-height: 220px;
	padding: 6px;
}

.singo-offcanvas-cat-list::-webkit-scrollbar {
	width: 4px;
}
.singo-offcanvas-cat-list::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

.singo-offcanvas-cat-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.singo-offcanvas-cat-item:hover {
	background: #f8fafc;
}

.singo-offcanvas-cat-item.singo-cat-item--active {
	background: rgba(173, 97, 65, 0.08) !important;
}

/* Restricted User Status Banner */
.singo-offcanvas-status-banner.singo-restricted {
	border-radius: 9px;
	padding: 12px 14px;
	font-size: 12.5px;
	line-height: 1.6;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: #fff1f2;
	border: 1px solid #fecdd3;
	color: #9f1239;
}

.singo-offcanvas-status-banner svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin-top: 2px;
}

/* 5. Off-Canvas Footer (Actions) */
.singo-offcanvas-footer {
	padding: 18px 22px;
	background: #ffffff;
	border-top: 1px solid #f1f5f9;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.singo-offcanvas-submit-btn {
	width: 100%;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--singo-offcanvas-primary);
	color: #ffffff !important;
	border: none;
	font-size: 14.5px;
	font-weight: 700;
	border-radius: 9px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 14px rgba(173, 97, 65, 0.28);
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 20px !important;
}

.singo-offcanvas-submit-btn:hover {
	background: var(--singo-offcanvas-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(173, 97, 65, 0.35);
}

.singo-offcanvas-submit-btn:active {
	transform: translateY(0);
}

.singo-offcanvas-submit-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.singo-offcanvas-submit-btn.singo-loading {
	opacity: 0.8;
	pointer-events: none;
}

.singo-offcanvas-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: singoOffcanvasSpin 0.7s infinite linear;
	display: none;
}

.singo-offcanvas-submit-btn.singo-loading .singo-offcanvas-spinner {
	display: inline-block;
}
.singo-offcanvas-submit-btn.singo-loading .singo-offcanvas-btn-icon {
	display: none;
}

@keyframes singoOffcanvasSpin {
	to { transform: rotate(360deg); }
}

/* Toast message inside off-canvas */
.singo-offcanvas-toast {
	display: none;
	background: #0f172a;
	color: #ffffff;
	font-size: 12px;
	padding: 8px 12px;
	border-radius: 6px;
	text-align: center;
	animation: singoFadeIn 0.2s ease;
}

@keyframes singoFadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* 6. Mobile Responsiveness */
@media (max-width: 640px) {
	#singo-price-list-offcanvas {
		width: 100vw;
		max-width: 100vw;
		border-radius: 0;
	}
	.singo-offcanvas-header {
		padding: 16px 18px;
	}
	.singo-offcanvas-body {
		padding: 18px;
	}
	.singo-offcanvas-footer {
		padding: 16px 18px;
	}
}
