:root {
  --brand: #5ea2ff;
  --brand-700: #2f76d4;
  --bg: #f6f7fb;
  --ink: #2f2f3d;
  --muted: #52556b;
  --card: #ffffff;
  --border: #e5e7eb;
  --accent: #fff4e5;
  --accent-text: #7a4a00;
  --danger: #ffe5e5;
  --danger-ink: #a40c0c;
  --ok: #eef6ff;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

* {
  box-sizing: border-box;
}

h1 {
  font-family: 'Montserrat', sans-serif;
  display:inline;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  margin-top: 16px;

  color: #0071C2;
  text-align: center;
}

.orange {
    color: #ff8869;

  }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  background: linear-gradient(180deg, #fafeff 0%, #c8e6ff 100%);
  line-height: 1.35;
  padding-bottom: 120px;

  min-height: 100vh; /* ensure it covers full viewport height */
  background-repeat: no-repeat;
  background-attachment: fixed; /* makes it stick and not repeat when scrolling */
  background-size: cover; /* stretch to fit */
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px 24px 24px 24px;
}

header img {
  width: 220px;
  margin-bottom: 24px;
  height: auto;
}

/* Header */
.hero {
  color: #0071C2;
  padding: 48px 20px 20px 20px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero .text {
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 18px;
  line-height: 26px;

  text-align: center;
  display: flex;
  justify-content: center;
}

.hero .title .badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff22;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.input-section {
  min-height: 440px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Results */
#resultsPane {
  height:100%;
}


/* Shell */
.shell {
  max-width: 1050px;
  margin: 20px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);

  padding-left: 16px;
  transition: all 0.3s ease
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
}

/* Left form */
.group-title {
  font-weight: 700;
  margin: 6px 0 28px 0;
  font-size: 18px;
}

.field-container {
  display: flex;
  margin-bottom: 24px;
  flex-direction: column;
}

.field-addendum {
  display: flex;
  align-self: flex-end;
  align-items: center;
  padding-left: 16px;

  font-size: 14px;
  font-weight: 300;
  height: 48px;
  color: var(--muted);

  position: relative;
  align-self: flex-start;
  text-align: left;
  height: 24px;
  width:75%;
  padding-left: 8px;
}

#ef-add {
  padding-top:0px;
}

.field {
  width: 70%;
  height: auto;
  margin-bottom: 0;
}

.label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;

  max-width: 200%;
}

.input {
  width: 100%;
  border: 2px solid #ececfd;
  border-radius: 10px;
  padding: 12px 12px;
  font-size: 18px;
  height: 48px;
  font-weight: 600;
  background: #fbfaff;
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}

.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(94, 162, 255, .25);
}

.row {
  display: flex;
  gap: 12px;
}

.row .field {
  flex: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 333px;
  border: none;
  background: #c8e6ff;
  color: #0071C2;
  font-weight: 700;
  cursor: pointer;
  transition: transform .04s ease, background .15s ease, border .15s ease;
  user-select: none;
  font-size: 18px;

  width: 100%;
  height:auto;
  text-align: center;
  justify-content: center;   /* centers horizontally */
  align-items: center;       /* centers vertically */
}

#secondary-button {
  background-color: #d8dff0;
}

a {
  text-decoration: none;
}

.CTA-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.button:hover {
  background: #e7f1ff;
}

.button:active {
  transform: translateY(1px);
}

/* Right column */

/* Jitter fix */
.resultsPane {
  height: calc(var(--vh, 1vh) * 100);
}

#filledState {
  height:100%;
}

.right-empty {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 320px;
  display: grid;
  place-items: center; 
  color: var(--muted);
  text-align: center;
  padding: 24px;

  height:100%;
  background: #fbfaff;
}

.charts-box {
  display: flex;
  justify-content: flex-start;
  align-items: end;
  padding-bottom: 32px;
  padding-top: 16px;

  width: 50%; /* ensure it takes full width */
}

.charts-box canvas {
  flex: 1; 
  max-width: 240px; 
  max-height: 200px;
  min-height: 140px;
  display: flex;
  justify-content: flex-start;
}

.pill-results{
  margin-top: 20px;
  margin-bottom: 20px;
}

.pill {
  /* background: #fafafa; */
  /* border: 1px solid var(--border); */
  border-radius: 12px;
  padding: 4px 0px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 500;
  padding-left: 12px;
}

.pill b {
  font-size: 16px;
}

.pill.accent {
  background: var(--accent);
  border-color: #ffd5a3;
  color: var(--accent-text);
}

.result-blurb {
  display: flex;
  align-self: center;
  width: 70%;
  text-align: left;
}

.calc-graphic {
  width: 100%;       
  display: flex;   
  justify-content: center;
  margin-bottom: 12px;

}

.calc-graphic img {
  width:144px;
  padding-right: 8px;
}


.summary {
  background: #edfbff;
  color: #0055af;
  border-radius: 16px;
  padding: 32px 32px 0px 32px;
  text-align: left;
  margin: 0;

  height:100%;
}

.summary .symbol {
  font-size: 32px;
  line-height: 1;
}

.summary .sub {
  font-size: 20px;
  opacity: .9;
  margin: 2px 0 6px 0;

}

.summary .big {
  font-size: 34px;
  font-weight: 800;
}

.savings {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  color: #0055af;
  background: #fff;
  padding: 12px 16px 16px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  line-height: 26px;

  margin-top: 32px;
}

.equation {
  margin-top: 12px;
  font-size: 13px;
  color: #374151;
  background: #fafafa;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  white-space: normal;
}

.muted {
  color: var(--muted);
}

.unit {
  opacity: 1;
  font-size: 21px;
}

/* RIGHT COLUMN TEXT SETTINGS */

#letna-rezerva,
#rezerva-circ {
  font-size: 36px;
  color: #0055af;
}

#flex-h2 {
  display: flex;
  align-items: flex-end;
  flex-direction: row;
}

#text-icon {
  width: 36px;
  height: 36px;

  margin-left: 12px;
  display: flex;
  align-items: center;
}

#mesečna-rezerva,
#prihranek,
#rezerva-na-del,
.unit {
  font-size: 21px;
  color: #0055af;
}


/* CUSTOM BUTTONS */

button {
  margin-top:16px;
  width: 100%;
	height:40px;
}

.calc-button-box {
  display: flex;
  width: 50%;
  height: 84px;
}

.CTA-box {
    margin-top: 56px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.CTA-box a {
  display: block;       
  width: 240px;         
  margin: 0 auto;       
  text-align: center; 
}

.CTA-button { 
	background: #ff8869;
	display: flex;
	justify-self: center; 
	align-self: center; 
	color:white;
	font-weight:500;
	border-radius:333px;
	transition-duration: 300ms;
	padding:20px 40px;
  text-transform:none;

  text-align: center;
  font-size: 20px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}


/*.CTA-button { 
	background: linear-gradient(180deg, #00A0DC 0%, #0055AF 45%, #00A0DC 150%);
	background-size: 200% 200%;
	width:140px;
	height:40px;
	display: flex;
	justify-content: center; 
	align-items: center; 
	color:white;
	font-weight:500;
	border-radius:54px;
	transition-duration: 300ms;
	margin-left: 16px;
	margin-right:8px;
	margin-top: auto;
	margin-bottom:auto;
	border:0px;
	font-size:18px;
	padding:0;
  text-transform:none;
  } */

.CTA-button:hover { 
cursor:pointer;
background-position: right bottom;
transform: scale(1.02);
background: #ffa087;
}

#CTA-text {
  color: #0071C2;
  font-size: 16px;
  margin-top: 32px;
  text-decoration: underline;
}

#CTA-text:hover {
  color: #00A0DC;
}

.fade-scale {
  display: none; /* initially hidden */
  pointer-events: none; /* ne zajema scroll/pointer dogodkov */
  position: relative;   /* ne fixed/absolute preko viewporta */
  height: auto;
  display: block;
}

.fade-scale.show {
  display: block;
  animation: fadeScale 120ms ease-out forwards;
}


/*TOOLTIPS*/

.tooltip-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.tooltip-text {
  visibility: hidden;
  padding: 8px 12px;         
  background-color: #2f2f3d;
  color: #ececfd;
  font-size: 12px;
  position: absolute;
  transform: translateY(0%) translateX(5%);
  opacity: 0;
  /* white-space: nowrap;       keep it on one line */
  width: 160px;
  border-radius: 4px;
  transition-delay: 1s;
  transition: opacity 0.4s;
  z-index: 10;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 0.9;
  
}

/* --------ANIMATION-------- */


@keyframes fadeScale {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/*-------BREAKPOINTS--------*/

@media (max-width: 900px) {

  .shell {
    padding: 0 20px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding-left: 0;
  }

  .input-section {
    align-items: center;
    width: auto;
}

  .field-container {
    width: 100%;
    max-width: 480px;
    align-items: center;
    flex-direction: column;

  }

  .field-addendum {
    position: relative;
    align-self: center;
    text-align: left;
    height: 24px;
    width:75%;
    padding-left: 8px;
  }

  .field {
  width: 75%;
  }

  .tooltip-container {
  width: 100%;
  box-sizing: border-box;
  }

  .tooltip-text {
  transform: translateY(112%) translateX(-100%);
  opacity: 0.4;
  }


  #flex-h2 {
  display: flex;
  justify-content: center;
  } 




}

@media (max-width: 600px) {

  h1 {
    font-size: 32px;
  }

  #flex-h2 {
    flex-direction: row-reverse;
    text-align: center;
    justify-content: center;
  }

  #text-icon {
    display: none;
  }

  .charts-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 32px;
    padding-top: 16px;

    width: 100%;
  }

  .shell {
    margin: 20px auto;
    padding: 0 16px;
  }

  .pill-results{
  margin-top: 20px;
  margin-bottom: 20px;
  }

  .pill {
    padding: 4px 0px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    gap: 16px;
    width: 100%;
  }

}