/* ==========================================================================
   Age Tool Styles (Công Cụ Xem Lịch & Ngày Tốt Theo Tuổi)
   ========================================================================== */

.age-tool-main {
	padding: 24px 0 60px;
	background-color: var(--color-bg, #fcfaf7);
	min-height: calc(100vh - 200px);
}

/* Hero Section */
.age-tool-hero {
	text-align: center;
	max-width: 860px;
	margin: 0 auto 32px;
	padding: 0 16px;
}

.age-tool-badge {
	display: inline-block;
	background: linear-gradient(135deg, #a62c2b 0%, #7e1918 100%);
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 6px 16px;
	border-radius: 999px;
	margin-bottom: 14px;
	box-shadow: 0 4px 12px rgba(166, 44, 43, 0.2);
}

.age-tool-title {
	font-size: clamp(26px, 4vw, 36px);
	font-weight: 800;
	color: var(--color-primary, #a62c2b);
	margin: 0 0 12px;
	line-height: 1.25;
}

.age-tool-desc {
	font-size: 15px;
	line-height: 1.65;
	color: #555555;
	margin: 0 auto;
	max-width: 740px;
}

/* Form Card */
.age-tool-form-card {
	background: #ffffff;
	border-radius: 20px;
	padding: 28px 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	border: 1px solid #ebdcd3;
	margin-bottom: 36px;
	position: relative;
	overflow: hidden;
}

.age-tool-form-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #a62c2b 0%, #d4af37 50%, #a62c2b 100%);
}

.age-form-row {
	display: grid;
	gap: 20px;
	align-items: flex-end;
}

.age-form-row--birth {
	grid-template-columns: 1.2fr 2fr 1.2fr;
	margin-bottom: 18px;
}

.age-form-row--target {
	grid-template-columns: 2fr 1fr;
	padding-top: 18px;
	border-top: 1px dashed #ebdcd3;
}

.form-group label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #444;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.input-with-icon {
	position: relative;
	display: flex;
	align-items: center;
}

.input-with-icon .form-control {
	width: 100%;
	height: 46px;
	padding: 8px 14px;
	font-size: 15px;
	font-weight: 600;
	color: #222;
	border: 1.5px solid #dcd3cb;
	border-radius: 10px;
	background-color: #fdfbf9;
	transition: all 0.2s ease;
}

.input-with-icon .form-control:focus {
	outline: none;
	border-color: #a62c2b;
	box-shadow: 0 0 0 3px rgba(166, 44, 43, 0.12);
	background-color: #fff;
}

.input-icon {
	position: absolute;
	right: 12px;
	pointer-events: none;
	font-size: 16px;
}

.select-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
	gap: 10px;
}

.select-wrap {
	position: relative;
}

.form-select {
	width: 100%;
	height: 46px;
	padding: 8px 10px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	border: 1.5px solid #dcd3cb;
	border-radius: 10px;
	background-color: #fdfbf9;
	cursor: pointer;
	transition: all 0.2s ease;
}

.form-select:focus {
	outline: none;
	border-color: #a62c2b;
	box-shadow: 0 0 0 3px rgba(166, 44, 43, 0.12);
	background-color: #fff;
}

/* Gender Pills */
.gender-pill-wrap {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	height: 46px;
}

.gender-pill {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin: 0 !important;
}

.gender-pill input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.gender-pill span {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #f7ede6;
	color: #6d4c41;
	font-size: 14px;
	font-weight: 700;
	border-radius: 10px;
	border: 1.5px solid #e2cfc2;
	transition: all 0.2s ease;
}

.gender-pill input:checked + span {
	background: #a62c2b;
	color: #ffffff;
	border-color: #851c1b;
	box-shadow: 0 2px 8px rgba(166, 44, 43, 0.25);
}

/* Submit Button */
.btn-age-submit {
	height: 46px;
	width: 100%;
	background: linear-gradient(135deg, #a62c2b 0%, #851c1b 100%);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.25s ease;
	box-shadow: 0 4px 14px rgba(166, 44, 43, 0.3);
}

.btn-age-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(166, 44, 43, 0.4);
	filter: brightness(1.05);
}

/* Preset Chips */
.age-quick-presets {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px dashed #ebdcd3;
}

.presets-label {
	font-size: 13px;
	font-weight: 700;
	color: #777;
}

.preset-chip {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 16px;
	background-color: #f7f1eb;
	color: #5d4037;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid #eadecf;
	transition: all 0.2s ease;
}

.preset-chip:hover {
	background-color: #ebdcd1;
	color: #a62c2b;
	text-decoration: none;
}

/* Profile Section */
.age-profile-section {
	background: #ffffff;
	border-radius: 20px;
	padding: 32px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
	border: 1px solid #ebdcd3;
	margin-bottom: 40px;
}

.age-section-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #f2e9e2;
}

.age-section-heading h2 {
	font-size: 22px;
	font-weight: 800;
	color: #a62c2b;
	margin: 0;
}

.age-birth-badge {
	background-color: #f7f1eb;
	color: #6b4c3d;
	font-size: 14px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 8px;
	border: 1px solid #e8ddd4;
}

.profile-cards-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}

.profile-card {
	padding: 24px;
	border-radius: 16px;
	border: 1.5px solid #e8ddd4;
}

.profile-card--identity {
	background: linear-gradient(145deg, #fffaf5 0%, #f7ece2 100%);
	border-color: #e5cdbe;
}

.profile-card--cungphi {
	background: linear-gradient(145deg, #f5faf8 0%, #e6f3ee 100%);
	border-color: #c9e4d8;
}

.card-hero-head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.zodiac-emoji {
	font-size: 46px;
	line-height: 1;
}

.card-kicker {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #888;
}

.profile-age-name,
.profile-cung-name {
	font-size: 26px;
	font-weight: 900;
	margin: 2px 0 4px;
}

.profile-age-name {
	color: #a62c2b;
}

.profile-cung-name {
	color: #1b5e20;
}

.profile-zodiac-sub {
	font-size: 14px;
	color: #555;
	margin: 0;
}

.badge-group {
	display: inline-block;
	background-color: #1b5e20;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 6px;
}

.profile-data-list {
	display: grid;
	gap: 10px;
}

.profile-data-item {
	font-size: 14px;
	color: #333;
	padding: 6px 0;
	border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.profile-data-item:last-child {
	border-bottom: none;
}

.data-label {
	color: #666;
	margin-right: 6px;
}

.data-sub {
	color: #888;
	font-size: 13px;
	margin-left: 4px;
}

.cungphi-directions {
	display: grid;
	gap: 12px;
}

.dir-box {
	border-radius: 10px;
	padding: 12px 14px;
}

.dir-box--good {
	background-color: #ffffff;
	border: 1px solid #c8e6c9;
}

.dir-box--bad {
	background-color: #ffffff;
	border: 1px solid #ffcdd2;
}

.dir-title {
	display: block;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.dir-box--good .dir-title {
	color: #2e7d32;
}

.dir-box--bad .dir-title {
	color: #c62828;
}

.dir-text {
	font-size: 13px;
	line-height: 1.5;
	margin: 0 0 4px;
	color: #333;
}

.dir-hint {
	font-size: 12px;
	color: #666;
}

/* Compatibility & Conflict Grid */
.compat-conflict-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.rule-box {
	border-radius: 16px;
	padding: 20px;
}

.rule-box--compat {
	background-color: #f7fbf8;
	border: 1.5px solid #d0e8d7;
}

.rule-box--conflict {
	background-color: #fff9f8;
	border: 1.5px solid #f9d5d0;
}

.rule-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.rule-header h4 {
	font-size: 16px;
	font-weight: 800;
	margin: 0;
	letter-spacing: 0.5px;
}

.rule-box--compat h4 {
	color: #2e7d32;
}

.rule-box--conflict h4 {
	color: #c62828;
}

.rule-body {
	display: grid;
	gap: 8px;
}

.rule-line {
	font-size: 14px;
	line-height: 1.6;
	color: #333;
}

.suitable-hours-tag {
	display: inline-block;
	background: #e8f5e9;
	color: #1b5e20;
	padding: 2px 8px;
	border-radius: 6px;
	font-weight: 600;
	margin-top: 4px;
}

/* Good Days Interactive Section */
.age-good-days-section {
	background: #ffffff;
	border-radius: 20px;
	padding: 32px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
	border: 1px solid #ebdcd3;
	margin-bottom: 40px;
}

.good-days-header-wrap {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 2px solid #f2e9e2;
}

.interactive-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;
	background-color: #f7ede6;
	color: #a62c2b;
	padding: 4px 10px;
	border-radius: 6px;
	margin-bottom: 8px;
}

.good-days-main-title {
	font-size: clamp(20px, 3vw, 24px);
	font-weight: 900;
	color: #a62c2b;
	margin: 0 0 8px;
}

.good-days-stats-sub {
	font-size: 14px;
	line-height: 1.6;
	color: #555;
	margin: 0;
	max-width: 800px;
}

.text-gold {
	color: #b78103;
}

/* Month Switcher Nav */
.month-switcher-nav {
	display: inline-flex;
	align-items: center;
	background-color: #f7f1eb;
	border: 1px solid #e8ddd4;
	border-radius: 12px;
	padding: 4px;
	gap: 6px;
}

.nav-month-btn {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 700;
	color: #a62c2b;
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.nav-month-btn:hover {
	background-color: #a62c2b;
	color: #ffffff;
	text-decoration: none;
}

.nav-month-current {
	font-size: 14px;
	font-weight: 800;
	color: #333;
	padding: 0 8px;
}

/* Filter Tabs */
.days-filter-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 24px;
}

.tab-btn {
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 700;
	border-radius: 20px;
	border: 1.5px solid #dcd3cb;
	background-color: #ffffff;
	color: #555;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tab-btn:hover {
	border-color: #a62c2b;
	color: #a62c2b;
}

.tab-btn.is-active {
	background: #a62c2b;
	color: #ffffff;
	border-color: #851c1b;
	box-shadow: 0 2px 8px rgba(166, 44, 43, 0.25);
}

.tab-btn--gold.is-active {
	background: #c98e04;
	border-color: #a87602;
}

.tab-btn--good.is-active {
	background: #2e7d32;
	border-color: #1b5e20;
}

.tab-btn--danger.is-active {
	background: #c62828;
	border-color: #b71c1c;
}

/* Days Grid */
.age-days-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 18px;
	margin-bottom: 30px;
}

.age-day-card {
	background: #ffffff;
	border-radius: 14px;
	padding: 18px;
	border: 1.5px solid #e8ddd4;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.age-day-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.age-day-card--dai_cat {
	border-color: #e5b839;
	background: linear-gradient(180deg, #fffdf8 0%, #fffbf0 100%);
	box-shadow: 0 4px 14px rgba(212, 175, 55, 0.15);
}

.age-day-card--cat {
	border-color: #a5d6a7;
	background: linear-gradient(180deg, #ffffff 0%, #f5faf6 100%);
}

.age-day-card--xung {
	border-color: #ffcdd2;
	background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
	opacity: 0.92;
}

.day-card-header {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.day-solar-box {
	text-align: center;
	background-color: #ffffff;
	border: 1px solid #ebdcd3;
	border-radius: 10px;
	padding: 6px 12px;
	min-width: 60px;
}

.day-solar-number {
	display: block;
	font-size: 26px;
	font-weight: 900;
	color: #a62c2b;
	line-height: 1;
}

.day-solar-meta {
	display: block;
	font-size: 11px;
	font-weight: 700;
	color: #777;
}

.day-dow {
	display: block;
	font-size: 11px;
	color: #999;
}

.day-badge-col {
	flex: 1;
}

.rating-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 800;
	padding: 3px 8px;
	border-radius: 6px;
	margin-bottom: 4px;
}

.rating-badge--daicat {
	background-color: #fff3cd;
	color: #856404;
	border: 1px solid #ffeeba;
}

.rating-badge--cat {
	background-color: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #c8e6c9;
}

.rating-badge--xung {
	background-color: #fbe9e7;
	color: #c62828;
	border: 1px solid #ffccbc;
}

.rating-badge--normal {
	background-color: #f5f5f5;
	color: #666;
	border: 1px solid #e0e0e0;
}

.day-lunar-line {
	font-size: 13px;
	color: #444;
}

.day-card-body {
	flex: 1;
	margin-bottom: 14px;
}

.reason-label,
.hours-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #888;
	margin-bottom: 2px;
}

.reason-text {
	font-size: 13px;
	color: #333;
	margin: 0 0 6px;
	line-height: 1.45;
}

.taboo-pill {
	display: inline-block;
	background-color: #ffebee;
	color: #c62828;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	margin-top: 4px;
}

.hours-text {
	font-size: 12px;
	color: #555;
	margin: 0;
	line-height: 1.4;
}

.day-card-footer {
	padding-top: 10px;
	border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.btn-view-day {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: #a62c2b;
	text-decoration: none;
	transition: all 0.2s ease;
}

.btn-view-day:hover {
	color: #7e1918;
	transform: translateX(3px);
	text-decoration: none;
}

/* Footer Actions */
.age-footer-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
	padding-top: 10px;
}

.btn-action-primary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: linear-gradient(135deg, #a62c2b 0%, #851c1b 100%);
	color: #ffffff;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
	transition: all 0.2s ease;
	box-shadow: 0 4px 14px rgba(166, 44, 43, 0.25);
}

.btn-action-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(166, 44, 43, 0.35);
	color: #ffffff;
	text-decoration: none;
}

.btn-action-secondary {
	display: inline-flex;
	align-items: center;
	padding: 12px 24px;
	background-color: #f7f1eb;
	color: #6b4c3d;
	border: 1px solid #ebdcd3;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.2s ease;
}

.btn-action-secondary:hover {
	background-color: #ebdcd1;
	color: #a62c2b;
	text-decoration: none;
}

/* Guide Section */
.age-guide-section {
	margin-bottom: 40px;
}

.guide-card {
	background: #ffffff;
	border-radius: 20px;
	padding: 36px 40px;
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.04);
	border: 1px solid #ebdcd3;
}

.guide-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #f2e9e2;
}

.guide-badge {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	background-color: #f7ede6;
	color: #a62c2b;
	padding: 6px 14px;
	border-radius: 999px;
}

.guide-cms-edit a {
	font-size: 13px;
	color: #a62c2b;
	font-weight: 600;
	text-decoration: none;
	padding: 4px 10px;
	border: 1px dashed #a62c2b;
	border-radius: 6px;
	transition: background 0.2s ease;
}

.guide-cms-edit a:hover {
	background: #fdf2f1;
}

.guide-content h2,
.guide-content h3 {
	color: #a62c2b;
	margin-top: 24px;
	margin-bottom: 12px;
}

.guide-content p,
.guide-content li {
	font-size: 15px;
	line-height: 1.7;
	color: #444;
}

.guide-content ul,
.guide-content ol {
	padding-left: 20px;
	margin-bottom: 18px;
}

/* Responsive Styles */
@media (max-width: 900px) {
	.age-form-row--birth,
	.age-form-row--target {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.profile-cards-grid,
	.compat-conflict-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.age-profile-section,
	.age-good-days-section,
	.guide-card,
	.age-tool-form-card {
		padding: 20px 16px;
	}

	.age-days-grid {
		grid-template-columns: 1fr;
	}
}
