/* =============================================================
   MortgageWire — rates.css
   Rates history page styles
============================================================= */


/* --- PAGE WRAPPER --- */
.rates-wrap {
	padding: 24px 24px 40px;
	max-width: 1200px;
	margin: 0 auto;
}


/* --- PAGE HEADER --- */
.rates-page-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 20px;
	gap: 20px;
}

.rates-page-hed {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 26px;
	font-weight: 400;
	color: #1A1A1A;
	letter-spacing: -0.3px;
	margin-bottom: 5px;
}

.rates-page-sub {
	font-size: 14px;
	color: #666660;
}

.rates-updated {
	text-align: right;
	flex-shrink: 0;
}

.ru-label {
	font-size: 10px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #999490;
	margin-bottom: 3px;
}

.ru-val {
	font-size: 13px;
	color: #666660;
}


/* --- CURRENT RATE CARDS --- */
.rates-cards {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
	margin-bottom: 20px;
}

.rate-card {
	background: #ffffff;
	border-radius: 10px;
	border: 0.5px solid #E0DDD6;
	padding: 16px;
}

.rcard-label {
	font-size: 10px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #999490;
	margin-bottom: 8px;
}

.rcard-val {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 26px;
	font-weight: 400;
	color: #0C2340;
	letter-spacing: -0.5px;
	margin-bottom: 6px;
	line-height: 1;
}

.rcard-chg {
	font-size: 12px;
	font-weight: 500;
	margin-bottom: 8px;
}

.rcard-chg-label {
	font-size: 10px;
	font-weight: 400;
	color: #999490;
}

.rcard-date {
	font-size: 10px;
	color: #C0BCB6;
}


/* --- DIRECTION COLORS (shared with style.css pattern) --- */
.up { color: #C0402A; }
.dn { color: #2A8A5A; }
.flat { color: #999490; }


/* --- CHART SECTION --- */
.rates-chart-section {
	background: #ffffff;
	border-radius: 10px;
	border: 0.5px solid #E0DDD6;
	margin-bottom: 20px;
	overflow: hidden;
}

.rcs-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 16px 20px 12px;
	border-bottom: 0.5px solid #F0EDE6;
	gap: 16px;
	flex-wrap: wrap;
}

.rcs-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 16px;
	font-weight: 400;
	color: #1A1A1A;
	margin-bottom: 3px;
}

.rcs-source {
	font-size: 11px;
	color: #999490;
}

.rcs-controls {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.rcs-series-tabs,
.rcs-range-tabs {
	display: flex;
	gap: 3px;
}

.rcs-tab,
.rcs-range {
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 20px;
	border: 0.5px solid #D0CCC4;
	background: #F7F5F0;
	color: #666660;
	cursor: pointer;
	font-family: 'Source Sans 3', sans-serif;
	transition: background 0.12s, color 0.12s, border-color 0.12s;
	white-space: nowrap;
}

.rcs-tab:hover,
.rcs-range:hover {
	background: #EAF2FC;
	color: #1A5FA0;
	border-color: #2176C7;
}

.rcs-tab.on,
.rcs-range.on {
	background: #2176C7;
	color: #ffffff;
	border-color: #2176C7;
}

.rcs-chart-wrap {
	padding: 16px 20px 8px;
	position: relative;
}

.rcs-chart-wrap canvas {
	width: 100%;
	height: 260px;
	display: block;
}

.rcs-tooltip {
	position: absolute;
	background: #0C2340;
	color: #ffffff;
	border-radius: 6px;
	padding: 7px 11px;
	pointer-events: none;
	z-index: 10;
	white-space: nowrap;
}

.rtt-date {
	font-size: 10px;
	color: #7AAAD8;
	margin-bottom: 2px;
}

.rtt-val {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 15px;
	color: #ffffff;
}

.rcs-stats {
	display: flex;
	gap: 0;
	border-top: 0.5px solid #F0EDE6;
}

.rcs-stat {
	flex: 1;
	padding: 12px 16px;
	border-right: 0.5px solid #F0EDE6;
	text-align: center;
}

.rcs-stat:last-child {
	border-right: none;
}

.rcs-stat-label {
	font-size: 10px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #999490;
	margin-bottom: 4px;
}

.rcs-stat-val {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 17px;
	font-weight: 400;
	color: #1A1A1A;
}

.rcs-stat-val--high { color: #C0402A; }
.rcs-stat-val--low  { color: #2A8A5A; }


/* --- HISTORY PENDING STATE --- */
.rates-chart-pending {
	background: #ffffff;
	border-radius: 10px;
	border: 0.5px dashed #D0CCC4;
	margin-bottom: 20px;
	padding: 48px 24px;
	text-align: center;
}

.rcp-icon {
	margin: 0 auto 16px;
	width: 40px;
	height: 40px;
	color: #C0BCB6;
}

.rcp-icon svg {
	width: 40px;
	height: 40px;
}

.rcp-hed {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 17px;
	font-weight: 400;
	color: #666660;
	margin-bottom: 8px;
}

.rcp-sub {
	font-size: 13px;
	color: #999490;
	max-width: 420px;
	margin: 0 auto;
	line-height: 1.6;
}


/* --- RATES TABLE --- */
.rates-table-section {
	background: #ffffff;
	border-radius: 10px;
	border: 0.5px solid #E0DDD6;
	margin-bottom: 16px;
	overflow: hidden;
}

.rts-head {
	padding: 10px 18px;
	border-bottom: 0.5px solid #E0DDD6;
	font-size: 10px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #999490;
	font-weight: 500;
	background: #F7F5F0;
}

.rates-table {
	width: 100%;
	border-collapse: collapse;
}

.rates-table th {
	padding: 10px 18px;
	font-size: 11px;
	font-weight: 500;
	color: #999490;
	text-align: left;
	border-bottom: 0.5px solid #E0DDD6;
	white-space: nowrap;
}

.rates-table td {
	padding: 12px 18px;
	font-size: 13px;
	border-bottom: 0.5px solid #F0EDE6;
	color: #1A1A1A;
}

.rates-table tr:last-child td {
	border-bottom: none;
}

.rates-table tr:hover td {
	background: #FAFAF8;
}

.rt-name {
	font-weight: 500;
	color: #1A1A1A;
}

.rt-val {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 16px;
}

.rt-prev {
	color: #888880;
}

.rt-chg {
	font-weight: 500;
}

.rt-date {
	color: #999490;
	font-size: 12px;
}

.rt-src {
	color: #C0BCB6;
	font-size: 11px;
}


/* --- CONTEXT CALLOUT --- */
.rates-context {
	background: #F7F5F0;
	border-radius: 10px;
	border: 0.5px solid #E0DDD6;
	padding: 16px 20px;
}

.rc-context-head {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #999490;
	margin-bottom: 8px;
}

.rc-context-body {
	font-size: 12px;
	color: #888880;
	line-height: 1.7;
}


/* =============================================================
   RESPONSIVE
============================================================= */
@media (max-width: 1024px) {
	.rates-cards {
		grid-template-columns: repeat(3, 1fr);
	}
	.rcs-controls {
		align-items: flex-start;
	}
}

@media (max-width: 768px) {
	.rates-wrap {
		padding: 18px 16px 32px;
	}
	.rates-page-head {
		flex-direction: column;
		align-items: flex-start;
		margin-bottom: 16px;
	}
	.rates-updated {
		text-align: left;
	}
	.rates-cards {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
	.rcs-head {
		flex-direction: column;
		align-items: flex-start;
	}
	.rcs-controls {
		width: 100%;
		align-items: flex-start;
	}
	.rcs-series-tabs {
		flex-wrap: wrap;
	}
	.rcs-stats {
		flex-wrap: wrap;
	}
	.rcs-stat {
		flex: 1 1 33%;
		border-right: none;
		border-bottom: 0.5px solid #F0EDE6;
	}
	.rcs-stat:last-child {
		border-bottom: none;
	}
	.rates-table th:nth-child(4),
	.rates-table td:nth-child(4),
	.rates-table th:nth-child(6),
	.rates-table td:nth-child(6) {
		display: none;
	}
}

@media (max-width: 480px) {
	.rates-cards {
		grid-template-columns: 1fr 1fr;
	}
	.rcard-val {
		font-size: 22px;
	}
	.rates-page-hed {
		font-size: 22px;
	}
	.rcs-series-tabs {
		gap: 4px;
	}
	.rcs-stat {
		flex: 1 1 50%;
	}
	.rates-table th:nth-child(3),
	.rates-table td:nth-child(3),
	.rates-table th:nth-child(5),
	.rates-table td:nth-child(5) {
		display: none;
	}
}
