/**
 * AVI Quote Public Stylesheet
 */

/* RFQ Buttons */
.avi-quote-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 18px;
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
	transition: all 0.2s ease-in-out;
}

.avi-quote-btn-icon {
	font-size: 16px;
	line-height: 1;
}

.avi-quote-price-hidden {
	display: inline-block;
	color: #0066cc;
	font-weight: bold;
	font-style: italic;
	margin: 5px 0;
}

/* Modal Popup Container */
.avi-quote-modal-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.avi-quote-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(2px);
}

.avi-quote-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	overflow-y: auto;
	z-index: 2;
	animation: aviQuoteFadeIn 0.25s ease-out;
}

@keyframes aviQuoteFadeIn {
	from { opacity: 0; transform: translateY(-15px); }
	to { opacity: 1; transform: translateY(0); }
}

.avi-quote-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #edf2f7;
	background: #f8fafc;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.avi-quote-modal-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 8px;
}

.avi-quote-modal-close {
	background: transparent;
	border: none;
	font-size: 24px;
	color: #94a3b8;
	cursor: pointer;
	line-height: 1;
	padding: 0;
}

.avi-quote-modal-close:hover {
	color: #0f172a;
}

.avi-quote-modal-body {
	padding: 20px;
}

.avi-quote-modal-footer {
	padding: 14px 20px;
	border-top: 1px solid #edf2f7;
	background: #f8fafc;
	display: flex;
	justify-content: flex-end;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
}

/* Product Preview Inside Modal */
.avi-quote-product-preview {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 12px;
	background: #f1f5f9;
	border-radius: 6px;
	margin-bottom: 16px;
}

.avi-quote-preview-thumb img {
	width: 50px;
	height: 50px;
	object-fit: cover;
	border-radius: 4px;
}

.avi-quote-preview-info h4 {
	margin: 0 0 4px 0;
	font-size: 15px;
	color: #0f172a;
}

.avi-quote-preview-sku {
	margin: 0;
	font-size: 12px;
	color: #64748b;
}

/* Form Layout */
.avi-quote-form-row {
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
}

.avi-quote-form-group {
	flex: 1;
	margin-bottom: 12px;
}

.avi-quote-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 4px;
}

.avi-quote-input {
	width: 100% !important;
	padding: 8px 12px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	box-sizing: border-box !important;
	outline: none;
}

.avi-quote-input:focus {
	border-color: #0066cc !important;
	box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15) !important;
}

/* File Dropzone */
.avi-quote-file-dropzone {
	position: relative;
	border: 2px dashed #cbd5e1;
	border-radius: 6px;
	padding: 16px;
	text-align: center;
	background: #f8fafc;
	cursor: pointer;
}

.avi-quote-file-input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.avi-quote-file-desc span {
	display: block;
	font-weight: 600;
	color: #475569;
}

.avi-quote-file-desc small {
	display: block;
	color: #94a3b8;
	margin-top: 2px;
}

.avi-quote-file-list {
	margin-top: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.avi-quote-file-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #e2e8f0;
	color: #334155;
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 4px;
}

/* Notices */
.avi-quote-notice-box {
	padding: 12px;
	border-radius: 6px;
	font-size: 14px;
	margin-top: 12px;
}

.avi-quote-notice-success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.avi-quote-notice-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* Quote Cart Styles */
.avi-quote-cart-layout {
	display: flex;
	gap: 30px;
	margin: 25px 0;
}

@media (max-width: 768px) {
	.avi-quote-cart-layout {
		flex-direction: column;
	}
	.avi-quote-form-row {
		flex-direction: column;
		gap: 0;
	}
}

.avi-quote-cart-items-panel {
	flex: 3;
}

.avi-quote-cart-form-panel {
	flex: 2;
}

.avi-quote-cart-table {
	width: 100%;
	border-collapse: collapse;
}

.avi-quote-cart-table th, 
.avi-quote-cart-table td {
	padding: 12px;
	border-bottom: 1px solid #e2e8f0;
	vertical-align: middle;
}

.avi-quote-cart-qty-input {
	width: 70px !important;
	padding: 6px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 4px;
	text-align: center;
}

.avi-quote-cart-remove-btn {
	background: transparent;
	border: none;
	font-size: 20px;
	color: #ef4444;
	cursor: pointer;
}

.avi-quote-card-box {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Customer Portal View */
.avi-quote-portal-container {
	margin: 30px 0;
}

.avi-quote-portal-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 16px 20px;
	border-radius: 8px;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 12px;
}

.avi-quote-paper {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 40px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.avi-quote-paper-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.avi-quote-meta-table td {
	padding: 4px 8px;
}

.avi-quote-table-sheet {
	width: 100%;
	border-collapse: collapse;
}

.avi-quote-table-sheet th {
	background: #f1f5f9;
	padding: 10px;
	border-bottom: 2px solid #cbd5e1;
	text-align: left;
}

.avi-quote-table-sheet td {
	padding: 12px 10px;
	border-bottom: 1px solid #e2e8f0;
}

/* Status Badges */
.avi-quote-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.avi-quote-status-new { background: #fef3c7; color: #92400e; }
.avi-quote-status-under_review, 
.avi-quote-status-quotation_draft { background: #e0e7ff; color: #3730a3; }
.avi-quote-status-quotation_sent { background: #dbeafe; color: #1e40af; }
.avi-quote-status-negotiation { background: #fae8ff; color: #86198f; }
.avi-quote-status-accepted { background: #dcfce7; color: #166534; }
.avi-quote-status-rejected, 
.avi-quote-status-expired { background: #fee2e2; color: #991b1b; }
.avi-quote-status-converted_to_order { background: #ccfbf1; color: #115e59; }

.avi-quote-wa-btn {
	background-color: #25D366 !important;
	color: #ffffff !important;
	border-color: #25D366 !important;
}

/* ==========================================================================
   Floating Mini Quote Basket & Slide-Out Drawer
   ========================================================================== */
.avi-quote-floating-wrap {
	position: fixed;
	bottom: 25px;
	z-index: 99999;
	font-family: inherit;
}

.avi-quote-pos-bottom-right {
	right: 25px;
}

.avi-quote-pos-bottom-left {
	left: 25px;
}

.avi-quote-floating-pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
	color: #ffffff !important;
	border: none;
	padding: 12px 20px;
	border-radius: 50px;
	box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4), 0 8px 10px -6px rgba(37, 99, 235, 0.3);
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	outline: none;
	text-decoration: none;
}

.avi-quote-floating-pill:hover {
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.5), 0 8px 10px -6px rgba(37, 99, 235, 0.4);
	color: #ffffff !important;
}

.avi-quote-pill-icon {
	font-size: 18px;
}

.avi-quote-pill-badge {
	background: #ef4444;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	min-width: 22px;
	height: 22px;
	line-height: 22px;
	border-radius: 50%;
	text-align: center;
	padding: 0 4px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	display: inline-block;
}

.avi-quote-bounce {
	animation: aviQuoteBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes aviQuoteBounce {
	0%, 100% { transform: scale(1); }
	40% { transform: scale(1.25); }
	70% { transform: scale(0.95); }
}

/* Mini Drawer Card */
.avi-quote-mini-drawer {
	position: absolute;
	bottom: 60px;
	width: 340px;
	max-height: 480px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	border: 1px solid #e2e8f0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 100000;
	animation: aviDrawerSlideUp 0.25s ease-out;
}

.avi-quote-pos-bottom-right .avi-quote-mini-drawer {
	right: 0;
}

.avi-quote-pos-bottom-left .avi-quote-mini-drawer {
	left: 0;
}

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

.avi-quote-mini-drawer-header {
	padding: 14px 16px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.avi-quote-mini-drawer-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.avi-quote-mini-drawer-title h4 {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
}

.avi-quote-drawer-count {
	background: #e2e8f0;
	color: #334155;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 10px;
}

.avi-quote-drawer-close {
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
	padding: 0;
}

.avi-quote-drawer-close:hover {
	color: #0f172a;
}

.avi-quote-mini-drawer-body {
	padding: 10px 14px;
	overflow-y: auto;
	max-height: 280px;
	flex: 1;
}

.avi-quote-drawer-items-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.avi-quote-drawer-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #f1f5f9;
}

.avi-quote-drawer-item:last-child {
	border-bottom: none;
}

.avi-quote-drawer-thumb img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	display: block;
}

.avi-quote-drawer-info {
	flex: 1;
	min-width: 0;
}

.avi-quote-drawer-name {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.avi-quote-drawer-meta {
	font-size: 12px;
	color: #64748b;
	margin-top: 2px;
}

.avi-quote-drawer-remove {
	background: none;
	border: none;
	color: #ef4444;
	font-size: 18px;
	cursor: pointer;
	padding: 2px 6px;
	line-height: 1;
	border-radius: 4px;
	transition: background 0.2s;
}

.avi-quote-drawer-remove:hover {
	background: #fee2e2;
}

.avi-quote-mini-drawer-footer {
	padding: 12px 16px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.avi-quote-drawer-btn-cart {
	display: block;
	width: 100%;
	text-align: center;
	background: #2563eb !important;
	color: #ffffff !important;
	padding: 10px 16px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	border: none;
	box-sizing: border-box;
}

.avi-quote-drawer-btn-cart:hover {
	background: #1d4ed8 !important;
	color: #ffffff !important;
}

@media (max-width: 600px) {
	.avi-quote-mini-drawer {
		width: calc(100vw - 40px);
		bottom: 70px;
	}
	.avi-quote-pos-bottom-right, .avi-quote-pos-bottom-left {
		right: 15px;
		left: auto;
		bottom: 15px;
	}
}

/* ==========================================================================
   Digital Signature Canvas Pad & Stamp
   ========================================================================== */
.avi-signature-canvas {
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	touch-action: none;
}

.avi-signature-pad-wrap {
	border: 2px dashed #94a3b8;
	border-radius: 6px;
	background: #f8fafc;
	padding: 4px;
}

.avi-quote-signature-verification-card {
	animation: aviFadeIn 0.3s ease-in;
}

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