/* ----------------------------------------
  WRAPPER MODE STYLES
---------------------------------------- */
.main-wrapper.step-mode {
  padding: 20px;
  box-shadow: 0 0 10px var(--contrast-3);
  border-radius: 10px;
}

.main-wrapper.result-mode {
  box-shadow: none;
  border-radius: 0;
}

.main-wrapper.result-mode .input-section {
  margin-bottom: 20px;
}

.main-wrapper.step-mode .input-wrapper {
  padding: 0 20px;
}

/* ----------------------------------------
  STEP HEADER / PROGRESS BAR
---------------------------------------- */
.step-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.step-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #4a6780;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-progress-bar {
  height: 4px;
  background-color: #d6dbe1;
  width: 60%;
  border-radius: 2px;
  position: relative;
}

.step-progress-fill {
  height: 100%;
  width: 0%;
  background-color: #f28c3f;
  border-radius: 2px;
  transition: width 0.3s ease;
}

#currentStepDisplay{
  color: #f28c3f;
}

.step-count {
  font-size: 14px;
  color: #4a6780;
}

/* ----------------------------------------
  STEP TRANSITIONS & DISPLAY
---------------------------------------- */
.step {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: 20px;
}

.step.active {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  opacity: 1;
  transform: translateX(0);
  z-index: 1;
}

.main-wrapper.step-mode .step {
  display: none;
}

.main-wrapper.step-mode .step.active {
  flex-direction: column;
}

.main-wrapper.result-mode .step {
  flex-direction: row;
  opacity: 1;
  transform: none;
  z-index: auto;
  margin-bottom: 0;
  column-gap: 16px;
}

.main-wrapper.result-mode .questions-wrapper{
  width: 50%;
}

.main-wrapper.step-mode .retirement-heading{
  display: none;
}

.main-wrapper.result-mode .retirement-heading{
  display: block;
  margin: 10px 7px;
}

.main-wrapper.result-mode .step-header,
.main-wrapper.result-mode .questions {
  display: none;
}

.result-details div{
  justify-items: center;
}

.result p{
  text-align: center !important;
  margin-bottom: 10px !important;
}

/* ----------------------------------------
  FLOATING FORM STYLES
---------------------------------------- */
.floating-form {
  position: relative;
}

.floating-form label {
  font-size: 10px;
  color: var(--contrast);
  position: absolute;
  top: 6px;
  left: 12px;
  transition: 0.2s;
  pointer-events: none;
}

.main-wrapper.step-mode .floating-form > label {
  left: 0 !important;
}

.floating-form input[type="text"],
.floating-form input[type="number"] {
  width: 100%;
  padding: 26px 12px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background: var(--base-3);
  color: var(--contrast);
  text-align: left;
  outline: 0;
  opacity: 1;
  -webkit-text-fill-color: var(--contrast-2);
  font-weight: 600;
  text-transform: capitalize;
}

.floating-form input[type="text"]::placeholder,
.floating-form input[type="number"]::placeholder {
  font-weight: 100;
  opacity: 0.5;
  text-transform: none;
}

/* INPUT OVERRIDES IN STEP MODE */
.main-wrapper.step-mode .floating-form input[type="text"],
.main-wrapper.step-mode .floating-form input[type="number"] {
  border: none !important;
  border-bottom: 2px solid var(--global-color-10) !important;
  padding-left: 0 !important;
  border-radius: 0 !important;
  width: 50% !important;
}

.main-wrapper.step-mode .floating-form input[type="text"]:focus,
.main-wrapper.step-mode .floating-form input[type="number"]:focus,
.main-wrapper.step-mode .floating-form input[type="text"]:hover,
.main-wrapper.step-mode .floating-form input[type="number"]:hover {
  border-color: var(--accent) !important;
}

/* ----------------------------------------
  ERRORS / INWORDS / BUTTONS
---------------------------------------- */
.error {
  color: red;
  font-size: 0.85em;
  margin-top: 5px;
}

.inWords {
  font-size: 0.85em;
  color: #555;
  margin-top: 4px;
  font-style: italic;
}

.navigation {
  text-align: center;
  margin-top: 20px;
}

button {
  padding: 10px 20px;
  margin: 0 10px;
  font-size: 16px;
}

.navigation-btns {
  margin-bottom: 20px;
  padding: 0 5px;
}

.main-wrapper.result-mode .navigation-btns {
  text-align: center;
  padding: 0;
}

/* ----------------------------------------
  INPUT ADJUSTMENTS
---------------------------------------- */
input {
  transition: all 0.3s ease;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}


.note {
    display: none;
    font-size: 12px;
    color: #777;
    margin-top: 20px;
    text-align: justify !important;
    width: 100%;
    margin: auto;
}

.main-wrapper.result-mode .note {
    display: block;
}

/* ----------------------------------------
  RESULT STYLES
---------------------------------------- */

.main-wrapper.result-mode .result-wrapper{
  flex-direction: column;
}

.main-wrapper.result-mode .view-calshflow-table {
    text-decoration: none;
    margin: 0 20px;
    display: block;
}

#cashflowTableWrapper {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(6 6 6 / 64%);
    display: block;
    position: fixed;
    overflow: overlay;
    display: none;
}

.popover {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--base-3);
    border: 1px solid #ccc;
    padding: 1rem;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(0, 0, 0, .2);
    border-radius: 8px;
    width: 600px;
    max-height: 80%;
    max-width: 90%;
    position: fixed;
    overflow: overlay;
}

.popover .close-btn {
    top: 0;
    right: 0;
    background: 0 0;
    border: none;
    font-size: 1.5rem;
    color: var(--contrast);
    cursor: pointer;
    position: absolute;
}

/* ----------------------------------------
  RESPONSIVE STYLES
---------------------------------------- */
@media (max-width: 767px) {

  .main-wrapper.step-mode .floating-form input[type="text"],
  .main-wrapper.step-mode .floating-form input[type="number"] {
    width: 100% !important;
  }
  .result p{
    font-size: 1rem !important;
  }
}

@media screen and (max-width: 576px) {
  .main-wrapper.result-mode .step{
    flex-direction: column;
    row-gap: 16px;
  }
  .main-wrapper.result-mode .questions-wrapper{
    width: 100%;
  }

}
