/* ===================================================================
   Age Calculator Pro — Frontend Styles
   =================================================================== */

.agecalc-wrap {
	max-width: 680px;
	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;
}
.agecalc-wrap *,
.agecalc-wrap *::before,
.agecalc-wrap *::after {
	box-sizing: border-box;
}

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

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

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

/* ---------- Form ---------- */
.agecalc-field-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.agecalc-field { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.agecalc-field label { font-size: 13px; font-weight: 600; color: #555; }
.agecalc-field input {
	padding: 11px 12px;
	border: 1px solid #d7dae0;
	border-radius: 8px;
	font-size: 14.5px;
	width: 100%;
	background: #fff;
	transition: border-color .15s ease;
}
.agecalc-field input:focus { outline: none; border-color: #e67e22; }
.agecalc-field input.agecalc-input-error { border-color: #e0554a; }

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

/* ---------- Loading spinner ---------- */
.agecalc-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: agecalcSpin .7s linear infinite;
}
@keyframes agecalcSpin {
	to { transform: rotate(360deg); }
}

/* ---------- Result ---------- */
.agecalc-result { margin-top: 32px; animation: agecalcFadeIn .3s ease; }

.agecalc-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 26px; }
.agecalc-box { background: #fff8f2; border: 1px solid #fbe0c4; border-radius: 12px; padding: 16px 6px; text-align: center; }
.agecalc-box-live { background: #fff1e0; border-color: #f5c896; }
.agecalc-num { display: block; font-size: 26px; font-weight: 800; color: #e67e22; font-variant-numeric: tabular-nums; }
.agecalc-label { display: block; font-size: 11.5px; color: #8a8f98; margin-top: 4px; font-weight: 600; }

.agecalc-totals { background: #f6f7f9; border: 1px solid #e7e9ec; border-radius: 12px; padding: 8px 20px; margin-bottom: 20px; }
.agecalc-total-row { display: flex; justify-content: space-between; padding: 11px 0; font-size: 14.5px; border-bottom: 1px solid #e7e9ec; }
.agecalc-total-row:last-child { border-bottom: none; }
.agecalc-total-row span { color: #5f6368; }
.agecalc-total-row strong { color: #111; font-variant-numeric: tabular-nums; }

.agecalc-next-bday {
	text-align: center;
	font-size: 14.5px;
	color: #444;
	background: #f0f7ff;
	border: 1px solid #cfe3fb;
	border-radius: 10px;
	padding: 14px;
	font-weight: 600;
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 600px) {
	.agecalc-wrap { padding: 28px 14px 60px; }
	.agecalc-header h1 { font-size: 26px; }
	.agecalc-header p { font-size: 14px; }
	.agecalc-field-row { flex-direction: column; gap: 14px; }
	.agecalc-grid { grid-template-columns: repeat(3, 1fr); }
	.agecalc-num { font-size: 22px; }
}

@media (max-width: 380px) {
	.agecalc-icon { font-size: 36px; }
	.agecalc-header h1 { font-size: 22px; }
	.agecalc-grid { grid-template-columns: repeat(2, 1fr); }
	.agecalc-total-row { font-size: 13.5px; }
}
