/* WA Link Generator - Frontend Styles */

.walg-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 1100px;
	margin: 0 auto;
	color: #1f1f1f;
	box-sizing: border-box;
}

.walg-wrap *,
.walg-wrap *::before,
.walg-wrap *::after {
	box-sizing: border-box;
}

.walg-grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 40px;
	align-items: start;
}

@media (max-width: 782px) {
	.walg-grid {
		grid-template-columns: 1fr;
	}
}

/* ---- Form column ---- */

.walg-heading {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 20px;
}

.walg-field-row {
	display: flex;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 14px;
}

.walg-country {
	border: none;
	border-right: 1px solid #dcdcdc;
	background: #fafafa;
	padding: 10px 8px;
	font-size: 14px;
	max-width: 140px;
}

.walg-phone {
	flex: 1;
	border: none;
	padding: 10px 12px;
	font-size: 15px;
	min-width: 0;
}

.walg-phone:focus,
.walg-country:focus {
	outline: none;
}

.walg-toolbar {
	display: flex;
	gap: 4px;
	background: #f2f2f2;
	border: 1px solid #dcdcdc;
	border-bottom: none;
	border-radius: 6px 6px 0 0;
	padding: 6px;
}

.walg-fmt {
	width: 30px;
	height: 30px;
	border: none;
	background: transparent;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.walg-fmt:hover {
	background: #e2e2e2;
}

.walg-message {
	width: 100%;
	border: 1px solid #dcdcdc;
	border-radius: 0 0 6px 6px;
	padding: 12px;
	font-size: 14px;
	line-height: 1.6;
	resize: vertical;
}

.walg-message:focus {
	outline: none;
	border-color: #25D366;
}

.walg-actions-row {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 20px;
	margin-top: 16px;
}

.walg-reset {
	background: none;
	border: none;
	color: #6b4fbb;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.03em;
	cursor: pointer;
	text-transform: uppercase;
}

.walg-reset:hover {
	text-decoration: underline;
}

.walg-generate {
	background: #3b1361;
	color: #ffffff;
	border: none;
	padding: 12px 24px;
	border-radius: 4px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.walg-generate:hover {
	background: #4a1a79;
}

.walg-generate:disabled {
	opacity: 0.6;
	cursor: default;
}

.walg-error {
	color: #d63638;
	font-size: 13px;
	margin-top: 10px;
}

.walg-result {
	margin-top: 20px;
	padding: 16px;
	background: #f7f5fb;
	border: 1px solid #e3ddf0;
	border-radius: 8px;
}

.walg-result label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b4fbb;
	margin: 12px 0 6px;
}

.walg-result label:first-child {
	margin-top: 0;
}

.walg-copy-row {
	display: flex;
	gap: 8px;
}

.walg-copy-row input {
	flex: 1;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #dcdcdc;
	border-radius: 4px;
	font-size: 13px;
	background: #ffffff;
}

.walg-copy-btn {
	background: #25D366;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.walg-copy-btn:hover {
	filter: brightness(0.95);
}

.walg-open-link {
	display: inline-block;
	margin-top: 14px;
	color: #3b1361;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.walg-open-link:hover {
	text-decoration: underline;
}

/* ---- Preview column: phone mockup ---- */

.walg-preview-col {
	display: flex;
	justify-content: center;
}

.walg-phone-mockup {
	width: 280px;
	background: #ffffff;
	border-radius: 34px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	padding: 10px 10px 18px;
	position: relative;
}

.walg-phone-notch {
	width: 60px;
	height: 5px;
	background: #dedede;
	border-radius: 3px;
	margin: 6px auto 10px;
}

.walg-phone-header {
	background: #075E54;
	color: #ffffff;
	border-radius: 18px 18px 0 0;
	padding: 12px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}

.walg-phone-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
}

.walg-phone-number {
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.walg-phone-screen {
	background: #ECE5DD;
	min-height: 260px;
	padding: 16px 12px;
	border-radius: 0 0 18px 18px;
}

.walg-bubble {
	background: #DCF8C6;
	border-radius: 10px;
	padding: 8px 10px 18px;
	font-size: 13px;
	line-height: 1.5;
	color: #1f1f1f;
	position: relative;
	max-width: 100%;
	word-break: break-word;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.walg-bubble-text {
	white-space: pre-wrap;
}

.walg-bubble-time {
	position: absolute;
	right: 10px;
	bottom: 6px;
	font-size: 10px;
	color: #6b6b6b;
}

.walg-bubble b,
.walg-bubble strong {
	font-weight: 700;
}

.walg-bubble i,
.walg-bubble em {
	font-style: italic;
}

.walg-bubble s,
.walg-bubble del {
	text-decoration: line-through;
}
