/* ==========================================================================
   QR Code Scanner - Auto Open Link
   Responsive styling for mobile / tablet / laptop / desktop
   ========================================================================== */

.qrcs-wrapper * {
	box-sizing: border-box;
}

/* ---- Trigger button ---- */
.qrcs-start-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #2271b1, #135e96);
	border: none;
	border-radius: 50px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(34, 113, 177, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.qrcs-start-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(34, 113, 177, 0.45);
	color: #fff;
}

.qrcs-start-btn:active {
	transform: translateY(0);
}

.qrcs-icon {
	flex-shrink: 0;
}

/* ---- Inline style (used via [qr_code_scanner]) ---- */
.qrcs-style-inline {
	display: inline-block;
	text-align: center;
}

/* ---- Floating style (homepage auto button) ---- */
.qrcs-style-floating {
	position: fixed;
	bottom: 24px;
	z-index: 99998;
}

.qrcs-style-floating.qrcs-pos-bottom-right {
	right: 24px;
}

.qrcs-style-floating.qrcs-pos-bottom-left {
	left: 24px;
}

.qrcs-style-floating .qrcs-start-btn {
	padding: 14px 22px;
	font-size: 15px;
}

/* On small screens, shrink the floating button to a round icon-only FAB
   so it doesn't crowd the page. */
@media (max-width: 480px) {
	.qrcs-style-floating .qrcs-start-btn {
		padding: 14px;
		border-radius: 50%;
	}
	.qrcs-style-floating .qrcs-btn-label {
		display: none;
	}
	.qrcs-style-floating.qrcs-pos-bottom-right {
		right: 16px;
		bottom: 16px;
	}
	.qrcs-style-floating.qrcs-pos-bottom-left {
		left: 16px;
		bottom: 16px;
	}
}

/* ---- Modal overlay ---- */
.qrcs-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	animation: qrcs-fade-in 0.15s ease;
}

@keyframes qrcs-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.qrcs-modal {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	text-align: center;
	animation: qrcs-scale-in 0.18s ease;
}

@keyframes qrcs-scale-in {
	from { transform: scale(0.94); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.qrcs-modal-title {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
	color: #1d2327;
}

.qrcs-close-btn {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #777;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
}

.qrcs-close-btn:hover {
	color: #1d2327;
	background: #f0f0f1;
}

/* ---- Reader (camera preview) ---- */
.qrcs-reader {
	margin: 0 auto;
	width: 100%;
	max-width: 320px;
	border-radius: 8px;
	overflow: hidden;
	background: #000;
}

.qrcs-reader video,
.qrcs-reader canvas {
	border-radius: 8px;
}

.qrcs-stop-btn {
	margin-top: 14px;
	display: inline-block;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: #c0392b;
	border: none;
	border-radius: 50px;
	cursor: pointer;
}

.qrcs-stop-btn:hover {
	background: #922b21;
}

/* ---- Result panel ---- */
.qrcs-result {
	margin-top: 18px;
	padding: 14px;
	background: #f6f7f7;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	text-align: left;
}

.qrcs-result-label {
	margin: 0 0 4px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #777;
	text-align: center;
}

.qrcs-result-text {
	margin: 0 0 12px;
	font-weight: 600;
	font-size: 14px;
	word-break: break-word;
	line-height: 1.5;
	text-align: center;
}

.qrcs-open-btn {
	display: block;
	width: 100%;
	text-align: center;
	padding: 12px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: #2271b1;
	border-radius: 6px;
	text-decoration: none;
}

.qrcs-open-btn:hover {
	background: #135e96;
	color: #fff;
}

.qrcs-open-btn.qrcs-pulse {
	animation: qrcs-pulse-glow 1.1s ease-in-out infinite;
}

@keyframes qrcs-pulse-glow {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(34, 113, 177, 0.5);
	}
	50% {
		box-shadow: 0 0 0 10px rgba(34, 113, 177, 0);
	}
}

.qrcs-countdown {
	margin: 10px 0 0;
	font-size: 13px;
	color: #555;
	text-align: center;
}

.qrcs-error {
	margin-top: 14px;
	padding: 10px 12px;
	font-size: 13px;
	color: #c0392b;
	background: #fdecea;
	border-radius: 6px;
}

/* ---- Responsive tweaks: tablets & laptops ---- */
@media (min-width: 782px) {
	.qrcs-modal {
		padding: 28px;
	}
	.qrcs-reader {
		max-width: 360px;
	}
}

/* ---- Larger desktop screens ---- */
@media (min-width: 1200px) {
	.qrcs-modal {
		max-width: 460px;
	}
}
