
/* BRANDING COLORS */
:root {
  --soft-blue: #6EC1E4;
  --navy: #2C3E50;
  --mint: #A2D5AB;
  --bg-light: #ffffff;
  --bg-color: #f8f9fa;
  --text-main: #333333;
}
body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-bottom: 20px; 
}
body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-bottom: 20px;
	margin: 0;
	padding: 20px;
	justify-content: center;
	min-height: 100vh;
	background-color: var(--bg-color);
	color: #333;
}
.container {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	padding: 20px;
	justify-content: center;
	max-width: 1400px;
	width: 100%;
	box-sizing: border-box;
	gap: 20px;
}
.chart-container {
	min-height: 400px; /* Ensures minimum height */
	width: 100%;
	position: relative;
	margin-top: 15px;
}
.charter {
	flex: 2;
	min-width: 300px;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 10px;
	background-color: white;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	display: flex;
	flex-direction: column;
}
.calculator, .results {
	flex: 1;
	min-width: 300px;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 10px;
	background-color: white;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
h1, h2 {
	color: var(--navy);
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
	text-align: center;
}
.calculator label {
	display: block;
	margin-top: 15px;
	font-weight: 600;
	text-align: center;
	color: #34495e;
}
.input-group {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0px 0;
	text-align: center;
	font-size: 15px;
}
.calculator input, select, ul {
	width: 90%;
	padding: 10px;
	font-size: 16px;
	text-align: center;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: white;
	margin: 5px;
}
.calculator button {
	width: 40px;
	padding: 12px;
	font-size: 16px;
	cursor: pointer;
	text-align: center;
	border-radius: 5px;
	transition: all 0.2s;
}
.calculator button.calculate {
	width: 80%;
	padding: 12px;
	font-size: 16px;
	cursor: pointer;
	margin: 25px auto 10px;
	display: block;
	background-color: #3498db;
	color: white;
	border: none;
	border-radius: 5px;
}
.calculator button.minus {
	background-color: #e74c3c;
	color: white;
	border: none;
}
.calculator button.plus {
	background-color: #2ecc71;
	color: white;
	border: none;
}
.calculator button:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}
.calculator button:active {
	transform: translateY(0);
}
.results {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.result-item {
	display: flex;
	justify-content: space-between;
	margin: 12px 0;
	padding: 8px;
	background-color: var(--bg-color);
	border-radius: 5px;
}
.result-label {
	font-weight: 500;
	text-align: left;
	flex: 1;
	color: #34495e;
}
.result-value {
	text-align: right;
	flex: 1;
	font-weight: 600;
	color: var(--navy);
}
.tabs {
	display: flex;
	justify-content: space-between;
	overflow: hidden;
}
.tab-button {
	padding: 12px 20px;
	background-color: #ecf0f1;
	border: none;
	cursor: pointer;
	flex: 1;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.5s;
}
.tab-button.active {
	background-color: var(--navy);
	color: white;
}
.tab-content {
	display: none;
	padding: 0;
	border: 1px solid var(--navy);
	border-radius: 5px;
	animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}
.tab-content.active {
	display: block;
}
.date-input {
	width: 70%;
	padding: 12px;
	font-size: 16px;
	text-align: center;
	margin: 10px auto;
	border: 1px solid #ddd;
	border-radius: 5px;
	display: block;
}
.section-divider {
	border-top: 1px solid #eee;
	margin: 20px 0 10px;
	padding: 10px;
	text-align: center;
	font-weight: 600;
	color: #3498db;
	background-color: #e0f7fa;
}
.loading {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255,255,255,.3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: spin 1s ease-in-out infinite;
	margin-right: 10px;
}
@keyframes spin {
	to { transform: rotate(360deg); }
}
.btn-group {
    width: 100%;
    border-top: 1px solid #eee;
    margin: 20px 0 10px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;              /* Allow wrapping on smaller screens */
    gap: 10px;                    /* Space between buttons */
    justify-content: center;      /* Center the buttons */
    align-items: center;
    text-align: center;
}
.export-btn {
    padding: 8px 14px;
    background-color: #9b59b6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 120px;
    flex: 1 1 auto; /* allows flexibility */
    text-align: center;
}
.export-btn:hover {
	background-color: #8e44ad;
}
.metrics-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(120px, 1fr));
	<!-- grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));--!>
	gap: 10px;
	margin: 10px;
}
.metric-card {
	background-color: var(--bg-color);
	border: 1px solid #ddd;
	padding: 15px;
	margin: 5px;
	border-radius: 20px;
	text-align: center;
}
.metric-value {
	font-size: 20px;
	font-weight: 700;
	color: var(--navy);
	margin: 5px 0;
}
.metric-label {
	font-size: 12px;
	color: #7f8c8d;
}
#stockPriceDisplay {
	padding: 12px;
	background-color: var(--bg-color);
	border-radius: 5px;
	margin: 15px 0;
	text-align: center;
}
#dataSource {
	font-weight: 600;
	color: #3498db;
}
.summary-text {
	margin: 10px 0 20px;
	padding: 12px;
	background-color: var(--bg-color);
	border-radius: 5px;
	font-size: 14px;
	text-align: left;
	line-height: 1.5;
}
.investAdvice-text {
	margin: 10px 0 20px;
	padding: 20px;
	background-color: #e1f2e4;
	border-radius: 5px;
	font-size: 14px;
	text-align: left;
	line-height: 1.5;
}
.calculator-inline-text {
	display: flex;
	justify-content: space-between;
	margin: 12px 0;
	padding: 8px;
	background-color: var(--bg-color);
	border-radius: 5px;
	text-align: center;
	font-weight: 400;
}
.calculator-inline-text .label {
	color: #34495e;
}
.calculator-inline-text .value {
	color: var(--navy);
}
.header-container {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e0e0e0;
	flex-wrap: wrap;
	gap: 10px;
}
.header-container > div {
	display: flex;
	align-items: center;
	gap: 10px;
}
.header-container img {
	height: 80px;
	width: auto;
	object-fit: contain;
}
.header-container h1 {
	color: var(--navy);
	margin: 0;
	font-size: 1.5rem;
	text-align: left;
	line-height: 1.2;
}
.header-container h2 {
	color: var(--navy);
	margin: 0;
	font-size: 1rem;
	font-weight: normal;
	text-align: left;
}
.currency-selector {
	padding: 8px 12px;
	max-width: 150px;
	align = right;
	border-radius: 5px;
	border: 1px solid #ddd;
	background-color: white;
	font-size: 14px;
	cursor: pointer;
}
#backToTopBtn {
	position: fixed;
	font-size: 18px;
	bottom: 30px;
	right: 20px;
	z-index: 99;
	font-size: 20px;
	background-color: #4CAF50;
	color: white;
	border: none;
	outline: none;
	cursor: pointer;
	padding: 10px 15px;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	display: none; /* Hidden by default */
	transition: opacity 0.3s ease;
}

#backToTopBtn:hover {
	background-color: #45a049;
}
.app-footer {
	width: calc(100% - 40px); /* Match the container's padding */
	max-width: 1400px; /* Match the container's max-width */
	margin: 30px auto 0;
	padding: 20px;
	background-color: white;
	color: black;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.footer-content {
	display: flex;
	flex-direction: column;
	gap: 15px;
}
.footer-section {
	padding: 10px 0;
}
.footer-section h3 {
	margin: 0;
	color: #3498db;
	font-size: 1.2rem;
}
.footer-section p {
	margin: 5px 0;
	font-size: 0.9rem;
	line-height: 1.5;
}
.partners {
	text-align: center;
	padding: 1rem 0;
	background: var(--bg-color);
}
.partners‑logos img {
	max-height: 40px;
	margin: 0 .75rem;
	filter: grayscale(80%);
	transition: filter .3s;
}
.partners‑logos img:hover { filter: none; }

@media (max-width: 768px) {
	.container {
		flex-direction: column;
		padding: 10px;
	}
	.charter, .calculator, .results {
		width: calc(100% - 20px);
		margin: 10px 0;
	}
	.chart-container {
		min-height: 350px;
	}
	.tabs {
		flex-direction: row;
	}
	.metrics-grid {
		grid-template-columns: 1fr 1fr;
	}
	.calculator input {
		width: 60%;
	}
	.calculator button.calculate {
		width: 90%;
	}
	.calculator-inline-text {
		flex-direction: column;
		text-align: center;
	}
	.calculator-inline-text .label {
		margin-bottom: 5px;
	}
	.header-container {
		width: 90%;
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		margin-bottom: 5px;
		flex-wrap: wrap;
		gap: 10px;
		flex-direction: column;
	}
	.header-container > div {
		width: 100%;
	}
	.app-footer {
		margin: 20px auto 0;
		padding: 15px;
	}
	
	.footer-section {
		padding: 8px 0;
	}
	
	.footer-section h3 {
		font-size: 1.1rem;
	}
	
	.footer-section p {
		font-size: 0.85rem;
	}
	.currency-selector {
		align-self: flex-end;
		margin-top: 0;
	}
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.ticker-suggestions-list {
    position: absolute;
    top: 90%;
    left: 0;
    z-index: 1000;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
}

.ticker-suggestions-list li {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.ticker-suggestions-list div {
    padding: 8px 12px;
    cursor: pointer;
}

.ticker-suggestions-list div:hover {
    background-color: #f1f1f1;
}

.ticker-suggestion-type {
  font-size: 11px;
  color: #999;
  margin-left: 6px;
}

.ticker-suggestion-item.active {
	background-color: #3498db;
	color: white;
}

