/* ═══════════════════════════════════════════════════════════
   Pregnancy Excuse Generator — Permission Slip Style
   Prefix: peg-
   ═══════════════════════════════════════════════════════════ */

.peg-wrap {
	max-width: 560px;
	margin: -20px auto 24px;
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(61,47,80,0.10);
	padding: 32px 24px 28px;
}

.peg-header {
	text-align: center;
	margin-bottom: 22px;
}
.peg-header-icon {
	font-size: 36px;
	margin-bottom: 4px;
}
.peg-header-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--text);
}
.peg-header-subtitle {
	font-size: 14px;
	color: var(--text-muted);
	font-weight: 600;
	margin-top: 2px;
}

/* ── Department pills ── */
.peg-depts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 24px;
}
.peg-dept {
	padding: 6px 14px;
	border-radius: 8px;
	border: 1.5px solid rgba(139,123,184,0.14);
	background: #fff;
	color: var(--text-muted);
	font-family: 'Nunito', sans-serif;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
}
.peg-dept:hover {
	border-color: var(--primary);
	color: var(--primary);
}
.peg-dept.active {
	background: rgba(139,123,184,0.08);
	border-color: var(--primary);
	color: var(--primary);
}

/* ── Certificate area ── */
.peg-cert-area {
	min-height: 200px;
	display: flex;
	justify-content: center;
	margin-bottom: 22px;
}

/* ── The certificate ── */
.peg-cert {
	width: 100%;
	background: linear-gradient(165deg, #fffefb 0%, #faf5ee 100%);
	border: 2.5px solid var(--primary);
	border-radius: 4px;
	padding: 28px 24px 22px;
	position: relative;
	box-shadow: 0 6px 24px rgba(139,123,184,0.10);
	animation: peg-appear 0.4s ease-out;
}
@keyframes peg-appear {
	0% { transform: scale(0.96); opacity: 0.5; }
	100% { transform: scale(1); opacity: 1; }
}
/* Inner dashed border */
.peg-cert::before {
	content: '';
	position: absolute;
	inset: 8px;
	border: 1.5px dashed rgba(139,123,184,0.2);
	border-radius: 2px;
	pointer-events: none;
}
/* Corner ornaments */
.peg-corner {
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(139,123,184,0.2);
}
.peg-corner-tl { top: 13px; left: 13px; border-right: none; border-bottom: none; }
.peg-corner-tr { top: 13px; right: 13px; border-left: none; border-bottom: none; }
.peg-corner-bl { bottom: 13px; left: 13px; border-right: none; border-top: none; }
.peg-corner-br { bottom: 13px; right: 13px; border-left: none; border-top: none; }

.peg-cert-top {
	text-align: center;
	margin-bottom: 8px;
}
.peg-cert-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--primary);
	border: 1px solid rgba(139,123,184,0.2);
	padding: 2px 12px;
	border-radius: 3px;
	margin-bottom: 6px;
}
.peg-cert-heading {
	font-family: 'Playfair Display', serif;
	font-size: 18px;
	font-weight: 700;
	font-style: italic;
	color: var(--text);
	margin-bottom: 2px;
}
.peg-cert-dept {
	font-size: 11px;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.peg-cert-body {
	font-family: 'Caveat', cursive;
	font-size: 22px;
	font-weight: 600;
	color: #2a1f3d;
	line-height: 1.5;
	margin: 16px 0;
	text-align: center;
	min-height: 66px;
}

.peg-cert-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	border-top: 1px solid rgba(139,123,184,0.12);
	padding-top: 8px;
	margin-top: 12px;
}

/* URL watermark */
.peg-cert-url {
	width: 100%;
	text-align: center;
	font-size: 8px;
	font-weight: 700;
	color: rgba(139,123,184,0.3);
	letter-spacing: 0.06em;
	margin-bottom: 8px;
}

/* Boldness rating */
.peg-boldness-label {
	font-size: 9px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-muted);
	margin-bottom: 4px;
}
.peg-boldness-dots {
	display: flex;
	gap: 5px;
}
.peg-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 1.5px solid var(--primary);
	background: transparent;
	transition: background 0.2s;
}
.peg-dot.filled {
	background: var(--primary);
}

/* Seal */
.peg-seal {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 2px solid rgba(139,123,184,0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-weight: 800;
	color: var(--primary);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	position: relative;
	background: rgba(139,123,184,0.03);
	flex-shrink: 0;
}
.peg-seal::before {
	content: '';
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	border: 1px solid rgba(139,123,184,0.15);
}

/* Placeholder */
.peg-placeholder {
	font-size: 15px;
	font-weight: 600;
	color: rgba(139,123,184,0.35);
	text-align: center;
	padding: 40px 16px;
	width: 100%;
}
.peg-placeholder span {
	display: block;
	font-size: 36px;
	margin-bottom: 8px;
}

/* ── Generate button ── */
.peg-btn-row {
	display: flex;
	justify-content: center;
	margin-bottom: 14px;
}
.peg-generate {
	padding: 14px 40px;
	border-radius: 8px;
	border: 2px solid var(--primary);
	background: #fff;
	color: var(--primary);
	font-family: 'Nunito', sans-serif;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	transition: all 0.2s;
}
.peg-generate:hover {
	background: var(--primary);
	color: #fff;
	box-shadow: 0 6px 20px rgba(139,123,184,0.25);
	transform: translateY(-1px);
}
.peg-generate:active {
	transform: translateY(1px);
}

/* ── Action buttons ── */
.peg-actions {
	display: flex;
	justify-content: center;
	gap: 10px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
}
.peg-actions.visible {
	opacity: 1;
	pointer-events: auto;
}
.peg-action {
	padding: 7px 16px;
	border-radius: 8px;
	border: 1.5px solid rgba(139,123,184,0.14);
	background: #fff;
	color: var(--text-muted);
	font-family: 'Nunito', sans-serif;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
}
.peg-action:hover {
	border-color: var(--primary);
	color: var(--primary);
}

/* ── Responsive ── */
@media (max-width: 600px) {
	.peg-wrap { padding: 24px 16px 22px; }
	.peg-cert { padding: 22px 16px 18px; }
	.peg-cert-body { font-size: 19px; }
	.peg-cert-heading { font-size: 16px; }
	.peg-dept { font-size: 12px; padding: 5px 11px; }
	.peg-generate { padding: 12px 32px; font-size: 15px; }
	.peg-actions { flex-wrap: wrap; }
	.peg-header-title { font-size: 18px; }
}
