/* --- GLOBAL DARK THEME --- */
:root {
  color-scheme: dark;
  --bg-dark: #0f1115;
  --bg-card: #181b20;
  --border: #2a2d33;
  --text-main: #e6e9ef;
  --white;
  --text-muted: #7c8696;
  --accent: #4cff75;       
  --accent-soft: #1c2533;
  --input-bg: #2f745f;
  --success-bg: #16331c;
  --success-border: #2c7a3c;
  --tooltip-bg: #1f242d;
}

/* --- PAGE --- */
body {
  font-family: system-ui, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0.5rem;
  background: var(--bg-dark);
  color: var(--text-main);
}

/* --- CARD --- */
.card, .cartier_row, .canvas {
  padding: 0.2rem 0.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

.card {
	max-width: 500px; 
}

.col-impar {
	min-width:200px;
}



.chart-container{

} 

.luna {
	display-inline;
}

.chart {
    max-height: 150px;
    max-width: 250px;
    margin-left:0px;
}

.text_container {
	margin-left:60px; 
	margin-bottom:15px; 
	padding-top: 0px;
    padding-bottom: 15px;
}




h3, p  {
	margin: 0px; 
	color: var(--text-main);
}

p {
    margin-left:10px;
	margin-top:5px;
	margin-bottom:0px;
}

p.randament {
	margin-top:0px; 
}

h2 {
    margin-left:10px;
    margin-top:5px;
	margin-bottom: 5px;
	color: var(--text-main);
}

h3 {
    margin-left:10px;
    margin-top:5px;
	margin-bottom: 5px;
	color: var(--text-muted);
}

.inline-wrap {
  display: inline-block;   /* flow inline */
  margin-bottom: 0;        /* optional */
}


/* --- LAYOUT --- */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  align-items: center;
  margin-top: 5px;
}

.cartier_row {
  gap: 15px;
  margin-top: 15px;
}

.row-2-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.randament { font-size: 0.9rem; color: var(--text-muted); margin-left:15px;}



.row-2-charts {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 5px;
}


.row-6 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr 1fr 1fr;
  gap: 5px;
  align-items: center;
  margin-top: 5px;
}

.align-right {
  align-items: right;
}

.align_left {
  text-align: left;
  float: right;
  margin-right: 30px;
  margin-top: 15px;
}


.row-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 5px;
  margin-top: 15px;
}

.col-par{
padding-bottom:15px;
}

.row_text{
  display: grid;
  grid-template-columns: auto;
  gap: 5px;
  align-items: center;
  margin-top: 5px;
}

.row_percentage {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 2fr;
  gap: 5px;
  align-items: center;
  margin-top: 5px;
}

.no-spin::-webkit-outer-spin-button,
.no-spin::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spin {
    -moz-appearance: textfield;
}

.row3.col {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: left;
  gap: 5px;
}

.midCol {
  display: grid;
  justify-items: center;
  gap: 5x;
}

input[type="number"],
.result {
  box-sizing: border-box;
  width: 90%;
  min-width: 60px;
  padding: 3px;
  font-size: 1rem;
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
}

input[type="number"] {
  background: var(--input-bg);
}

.result {
   background: var(--accent-soft);
 }


select.currencySelect {
  box-sizing: border-box;
  width: 80%;
  min-width: 70px;
  padding: 3px;
  font-size: 1rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--text-main);
  border: 1px solid var(--border);
}

/* center percentage field */
#percentInput {
  text-align: center;
  width: 40%;
}

/* Result box styling */
.result {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
#  min-height: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

/* --- BUTTON --- */
button.swap {
    padding:5px;
  margin-left: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
  background: var(--accent-soft);
  color: var(--accent);
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}



button.swap:hover {
  background: #263244;
  border-color: var(--accent);
}

/* --- TEXT STYLES --- */
.muted { color: var(--text-muted); font-size: 0.9rem; }
.subtleLabel { font-size: 0.9rem; color: var(--text-muted); text-align: center; }

/* --- COPYABLE RESULT --- */
.result.copyable {
  cursor: pointer;
  position: relative;
}

.result.copyable.copied {
  background: var(--success-bg);
  border-color: var(--success-border);
  transition: background 0.4s, border-color 0.4s;
}

/* Tooltip */
.result.copyable::after {
#  content: "Click sa copiezi";
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--tooltip-bg);
  padding: 2px 6px;
  border-radius: 4px;
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.25s;
}

.result.copyable:hover::after {
  opacity: 1;
}

.result.copyable.copied::after {
  content: "Copiat!";
  color: #4cff75;
  opacity: 1;
}


@media (max-width: 600px) { /* adjust the width as needed */
	.row-2-main {
		grid-template-columns: 1fr; /* stack columns vertically */
	}
	
	.row-2-charts {
	  display: grid;
	  grid-template-columns: 1fr 1fr;
	  gap: 5px;
	}

	.col-par .text_container h3 {
		margin-bottom:40px; 
	}

	.chart{
	max-height: 80px;
    max-width: 200px;
    margin-top: 0px;
	}

	.text_container {
		margin-left:0px; 
		margin-bottom:15px; 
		padding-top: 0px;
		padding-bottom: 15px;
	}

	p {
		margin-top:10px;
		margin-left:15px;
	}

	.randament { 
	font-size: 0.9rem; 
	color: var(--text-muted); margin-left:15px;
	}

	.col-impar {
	  min-width: 100px;
	}

	h3, h2, .luna {
		text-align: center;
	}

	h3 {
		margin: 10px;
	}

	canvas {
		display:block;
	}

	.align_left {
	  text-align: center;
	  float: center;

	  margin-top: 20px;
	}

}



/* Stack on small screens */
@media (max-width: 300px) {
#  .row-6 { grid-template-columns: 1fr; }
  .midCol { justify-self: center; }
  .card {
    border: 1px solid var(--border);
    min-width:200px;  
  }
  .col {
    gap: 5px;
  }
}
