/**
 * Sonderplugin QR Code Frontend Styles
 */

.sonder-qr-wrapper {
	display: inline-block;
	max-width: 100%;
}

.sonder-qr-wrapper a.sonder-qr-link {
	display: inline-block;
	text-decoration: none;
}

.sonder-qr-code {
	position: relative;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	padding: 6px;
	box-sizing: border-box;
	border: 1px solid #e2e4e7;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.sonder-qr-link:hover .sonder-qr-code {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.sonder-qr-code svg,
.sonder-qr-svg,
.sonder-qr-image {
	width: 100%;
	height: auto;
	display: block;
	max-width: 100%;
}

.sonder-qr-label {
	text-align: center;
	margin-top: 8px;
	font-size: 13px;
	color: #555;
}

/* -------------------------------------------------------------------------
 * Floating Bottom-Left Widget
 * ------------------------------------------------------------------------- */
.sonder-qr-floating-container {
	position: fixed;
	bottom: 8px;
	left: 8px;
	z-index: 999999;
	margin: 0;
	padding: 0;
	line-height: 0;
	box-sizing: border-box;
}

.sonder-qr-floating-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 78px;
	margin: 0;
	padding: 3px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 6px;
	background: #ffffff;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	user-select: none;
	outline: none;
	box-sizing: border-box;
	line-height: 0;
	overflow: hidden;
}

.sonder-qr-floating-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sonder-qr-floating-btn:active {
	transform: translateY(0);
}

.sonder-qr-floating-btn:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.sonder-qr-floating-btn svg {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border-radius: 3px;
}

/* -------------------------------------------------------------------------
 * Floating QR Code Modal Dialog
 * ------------------------------------------------------------------------- */
.sonder-qr-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	line-height: 1.4;
}

.sonder-qr-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.sonder-qr-modal-dialog {
	position: relative;
	background: #ffffff;
	width: 100%;
	max-width: 420px;
	border-radius: 16px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: sonderQrModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
	z-index: 1;
}

@keyframes sonderQrModalFadeIn {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(8px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.sonder-qr-modal-header {
	padding: 16px 20px;
	border-bottom: 1px solid #f1f5f9;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	background: #ffffff;
	box-sizing: border-box;
}

.sonder-qr-modal-header-info {
	flex: 1;
	min-width: 0;
}

.sonder-qr-modal-subtitle {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
	margin-bottom: 2px;
}

.sonder-qr-modal-title {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sonder-qr-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 0;
	border-radius: 6px;
	transition: color 0.15s, background 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
}

.sonder-qr-modal-close:hover {
	color: #0f172a;
	background: #f1f5f9;
}

.sonder-qr-modal-body {
	padding: 24px 20px 20px 20px;
	text-align: center;
	background: #f8fafc;
	box-sizing: border-box;
}

.sonder-qr-modal-preview {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 16px;
}

.sonder-qr-modal-svg-wrap {
	width: 260px;
	height: 260px;
	background: #ffffff;
	padding: 10px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
	border: 1px solid #e2e8f0;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sonder-qr-modal-svg-wrap svg {
	width: 100%;
	height: 100%;
	display: block;
}

.sonder-qr-modal-link {
	margin-top: 8px;
}

.sonder-qr-modal-url-text {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	font-size: 12px;
	color: #475569;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: #ffffff;
	padding: 6px 12px;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	box-sizing: border-box;
	transition: color 0.15s, border-color 0.15s;
}

.sonder-qr-modal-url-text:hover {
	color: #2563eb;
	border-color: #cbd5e1;
}

.sonder-qr-modal-footer {
	padding: 16px 20px;
	background: #ffffff;
	border-top: 1px solid #f1f5f9;
	display: flex;
	gap: 10px;
	box-sizing: border-box;
}

.sonder-qr-modal-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s ease;
	border: 1px solid transparent;
	box-sizing: border-box;
	line-height: 1.2;
}

.sonder-qr-modal-btn svg {
	flex-shrink: 0;
}

.sonder-qr-modal-btn-print {
	background: #0f172a;
	color: #ffffff;
	border-color: #0f172a;
}

.sonder-qr-modal-btn-print:hover {
	background: #1e293b;
	border-color: #1e293b;
	color: #ffffff;
}

.sonder-qr-modal-btn-download {
	background: #ffffff;
	color: #334155;
	border-color: #cbd5e1;
}

.sonder-qr-modal-btn-download:hover {
	background: #f8fafc;
	color: #0f172a;
	border-color: #94a3b8;
}

/* -------------------------------------------------------------------------
 * Responsive Breakpoints
 * ------------------------------------------------------------------------- */
@media (max-width: 480px) {
	.sonder-qr-floating-container {
		bottom: 6px;
		left: 6px;
	}

	.sonder-qr-floating-btn {
		width: 64px;
		height: 64px;
		padding: 2px;
		border-radius: 5px;
	}

	.sonder-qr-modal-svg-wrap {
		width: 220px;
		height: 220px;
	}

	.sonder-qr-modal-footer {
		flex-direction: column;
	}
}

/* -------------------------------------------------------------------------
 * Print Media Rules
 * ------------------------------------------------------------------------- */
@media print {
	#sonder-qr-floating-container,
	.sonder-qr-floating-container,
	#sonder-qr-modal,
	.sonder-qr-modal {
		display: none !important;
	}
}
