/* ===================================================================
   QR Code Generator Pro — Frontend Styles
   =================================================================== */

.qrgen-wrap {
	max-width: 640px;
	margin: 0 auto;
	padding: 40px 20px 80px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: #212529;
	box-sizing: border-box;
}
.qrgen-wrap *,
.qrgen-wrap *::before,
.qrgen-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */
.qrgen-header { text-align: center; margin-bottom: 30px; }
.qrgen-icon { font-size: 44px; display: block; margin-bottom: 10px; }
.qrgen-header h1 { font-size: 32px; font-weight: 800; margin: 0 0 10px; color: #111; }
.qrgen-header p { color: #5f6368; font-size: 15.5px; line-height: 1.6; max-width: 520px; margin: 0 auto; }

/* ---------- Alerts (success / error) ---------- */
.qrgen-alert {
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14.5px;
	margin-bottom: 20px;
	text-align: center;
	font-weight: 600;
	animation: qrgenFadeIn .25s ease;
}
.qrgen-alert-success { background: #e6f7ee; color: #1a7f4e; border: 1px solid #b8e8cf; }
.qrgen-alert-error   { background: #fdecea; color: #c0392b; border: 1px solid #f5c2be; }

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

/* ---------- Result box ---------- */
.qrgen-result-box {
	background: #f6f7f9;
	border: 1px solid #e7e9ec;
	border-radius: 12px;
	padding: 24px;
	text-align: center;
	margin-bottom: 25px;
	animation: qrgenFadeIn .3s ease;
}
.qrgen-result-preview {
	max-width: 220px;
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin-bottom: 14px;
	border: 1px solid #e0e2e6;
	background: #fff;
	padding: 8px;
}
.qrgen-result-info { font-size: 14px; color: #555; margin-bottom: 16px; }
.qrgen-download-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Mode tabs ---------- */
.qrgen-mode-tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.qrgen-tab {
	flex: 1;
	text-align: center;
	border: 1px solid #d7dae0;
	border-radius: 10px;
	padding: 11px 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	color: #444;
	transition: all .15s ease;
	user-select: none;
}
.qrgen-tab input { margin-right: 6px; }
.qrgen-tab.active { border-color: #6c5ce7; background: #f4f2ff; color: #4b3cc4; }

/* ---------- Form ---------- */
.qrgen-form textarea {
	width: 100%;
	padding: 14px;
	border: 1px solid #d7dae0;
	border-radius: 10px;
	font-size: 14.5px;
	font-family: inherit;
	resize: vertical;
	margin-bottom: 6px;
	transition: border-color .15s ease;
}
.qrgen-form textarea:focus { outline: none; border-color: #6c5ce7; }
.qrgen-form textarea.qrgen-input-error { border-color: #e0554a; }

.qrgen-char-count { text-align: right; font-size: 12px; color: #9aa0a6; margin-bottom: 16px; }

.qrgen-field-row { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.qrgen-field { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.qrgen-field label { font-size: 13px; font-weight: 600; color: #555; }
.qrgen-field select,
.qrgen-field input[type="file"] {
	padding: 9px 10px;
	border: 1px solid #d7dae0;
	border-radius: 8px;
	font-size: 13.5px;
	background: #fff;
	width: 100%;
}
.qrgen-file-name { font-size: 12px; color: #6c5ce7; word-break: break-all; }

/* ---------- Buttons ---------- */
.qrgen-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #6c5ce7;
	color: #fff !important;
	border: none;
	padding: 12px 26px;
	font-size: 15px;
	font-weight: 700;
	border-radius: 10px;
	cursor: pointer;
	text-decoration: none;
	transition: background .2s ease, opacity .2s ease;
}
.qrgen-btn:hover { background: #5849c4; }
.qrgen-btn-submit { width: 100%; padding: 13px 34px; font-size: 16px; }
.qrgen-btn-submit:disabled { opacity: .7; cursor: not-allowed; }
.qrgen-btn-disabled { background: #cfcbe8; cursor: not-allowed; color: #fff !important; }

/* ---------- Loading spinner ---------- */
.qrgen-btn-spinner {
	width: 16px;
	height: 16px;
	border: 2.5px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	display: inline-block;
	animation: qrgenSpin .7s linear infinite;
}
@keyframes qrgenSpin {
	to { transform: rotate(360deg); }
}

/* Skeleton shimmer shown in result box while a request is in-flight */
.qrgen-result-box.qrgen-loading {
	position: relative;
	min-height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #8a8f98;
	font-size: 14px;
	font-weight: 600;
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 600px) {
	.qrgen-wrap { padding: 28px 14px 60px; }
	.qrgen-header h1 { font-size: 26px; }
	.qrgen-header p { font-size: 14px; }
	.qrgen-field-row { flex-direction: column; gap: 14px; }
	.qrgen-download-row { flex-direction: column; }
	.qrgen-download-row .qrgen-btn { width: 100%; }
	.qrgen-mode-tabs { gap: 8px; }
	.qrgen-tab { padding: 10px 6px; font-size: 13px; }
}

@media (max-width: 380px) {
	.qrgen-icon { font-size: 36px; }
	.qrgen-header h1 { font-size: 22px; }
}
