/* Calcshala Age Calculator */
.csac {
	--csac-accent: #009688;
	--csac-accent-dark: #00796b;
	--csac-accent-soft: #e6f5f3;
	--csac-text: #1f2937;
	--csac-muted: #6b7280;
	--csac-border: #374151;
	max-width: 480px;
	margin: 24px auto;
	padding: 0 12px;
	font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color: var(--csac-text);
	line-height: 1.4;
}
.csac *,
.csac *::before,
.csac *::after { box-sizing: border-box; }

.csac__head { text-align: center; margin-bottom: 16px; }
.csac .csac__title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--csac-text);
}
.csac .csac__sub {
	margin: 0 auto;
	max-width: 380px;
	font-size: 13px;
	color: var(--csac-muted);
}

.csac__card {
	background: #fff;
	border-radius: 14px;
	padding: 20px 18px 22px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .09);
}

.csac__field { margin-bottom: 16px; }
.csac .csac__field label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--csac-text);
}

/* info tooltip */
.csac__tip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	margin-left: 4px;
	border: 1px solid var(--csac-muted);
	border-radius: 50%;
	font-size: 9px;
	font-weight: 700;
	font-style: normal;
	color: var(--csac-muted);
	cursor: help;
	vertical-align: 1px;
}
.csac__tip::after {
	content: attr(data-tip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-30%);
	width: 220px;
	padding: 8px 10px;
	border-radius: 6px;
	background: #111827;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.35;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s;
	z-index: 20;
}
.csac__tip:hover::after,
.csac__tip:focus::after { opacity: 1; visibility: visible; }

/* inputs */
.csac .csac__input {
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 1.5px solid var(--csac-border);
	border-radius: 6px;
	background: #fff;
	font-family: inherit;
	font-size: 16px;
	color: var(--csac-text);
	box-shadow: none;
}
.csac .csac__input:focus {
	outline: none;
	border-color: var(--csac-accent);
	box-shadow: 0 0 0 3px rgba(0, 150, 136, .18);
}

/* pills */
.csac__pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.csac .csac__pill {
	margin: 0;
	padding: 4px 12px;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	background: #fff;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	color: #4b5563;
	cursor: pointer;
	transition: all .15s;
}
.csac .csac__pill:hover,
.csac .csac__pill.is-active {
	background: var(--csac-accent);
	border-color: var(--csac-accent);
	color: #fff;
}

/* advanced */
.csac__adv { margin: 4px 0 16px; }
.csac__adv summary {
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	color: var(--csac-accent);
	list-style: none;
}
.csac__adv summary::-webkit-details-marker { display: none; }
.csac__adv summary::before { content: "\25B8"; display: inline-block; margin-right: 6px; font-size: 10px; transition: transform .15s; }
.csac__adv[open] summary::before { transform: rotate(90deg); }
.csac__field--adv { margin: 14px 0 0; }

/* error */
.csac__error {
	margin: 0 0 14px;
	padding: 10px 12px;
	border-left: 4px solid #dc2626;
	border-radius: 6px;
	background: #fef2f2;
	font-size: 13px;
	color: #991b1b;
}
.csac__error[hidden],
.csac__result[hidden] { display: none; }

/* buttons */
.csac__actions { display: flex; gap: 12px; }
.csac .csac__btn {
	flex: 1;
	min-height: 44px;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 6px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s, transform .05s;
}
.csac .csac__btn:active { transform: translateY(1px); }
.csac .csac__btn--primary,
.csac .csac__btn--ghost { background: var(--csac-accent); color: #fff; }
.csac .csac__btn--primary:hover,
.csac .csac__btn--ghost:hover { background: var(--csac-accent-dark); }

/* result */
.csac__result { margin-top: 20px; animation: csac-in .3s ease; }
@keyframes csac-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.csac__range {
	margin: 0 0 12px;
	text-align: center;
	font-size: 12px;
	color: var(--csac-muted);
}
.csac__ymd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.csac__ymd-item {
	padding: 14px 6px;
	border-radius: 10px;
	background: var(--csac-accent-soft);
	text-align: center;
}
.csac__ymd-num { display: block; font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--csac-accent-dark); }
.csac__ymd-lbl { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--csac-muted); text-transform: uppercase; letter-spacing: .04em; }

.csac__sec { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--csac-text); }
.csac__rows { margin: 0; padding: 0; list-style: none; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.csac__rows li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	font-size: 13px;
	border-bottom: 1px solid #eef0f2;
}
.csac__rows li:last-child { border-bottom: 0; }
.csac__rows li:nth-child(even) { background: #fafafa; }
.csac__rows span:first-child { color: var(--csac-muted); }
.csac__rows span:last-child { font-weight: 700; text-align: right; }

.csac__bday {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--csac-accent);
	color: #fff;
	font-size: 13px;
	text-align: center;
}
.csac__bday strong { font-size: 15px; }

@media (max-width: 400px) {
	.csac .csac__title { font-size: 21px; }
	.csac__ymd-num { font-size: 26px; }
	.csac__card { padding: 16px 14px 18px; }
}
