/*.auto-calculator-collapse{ margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);} */
/* .calc-widget-top-ancestor { position: relative; } */
.auto-loan-widget-collapse { 
  display: none;
  position: absolute; 
	background-image: linear-gradient(rgba(27, 62, 53, 1), rgba(27, 62, 53, 1)) !important;
	background-position: left top !important;
	background-size: auto !important;
	background-repeat: no-repeat !important;
  z-index:10;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
  transform-origin: center center;
  opacity: 0;  
	width: 100%;
}
/* 3. New keyframes for a stretch effect */
@keyframes stretchIn {
  0% {
    transform: translate(-50%, -50%) scale(0, 0);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.2, 1.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1, 1);
    opacity: 1;
  }
}

/* 3. Keyframes for vertical accordion effect */
@keyframes accordionIn {
  0% {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -50%) scaleY(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scaleY(1);
    opacity: 1;
  }
}

@keyframes accordionOut {
  0% {
    transform: translate(-50%, -50%) scaleY(1);
    opacity: 1;
  }
  40% {
    transform: translate(-50%, -50%) scaleY(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
  }
}

/* when we add `.active`, show + run the animation */
.auto-loan-widget-collapse.active {
  display: block;
  width: 100%;  
  /*animation: stretchIn 0.4s ease-out forwards; */
  animation: accordionIn 1.0s ease-out forwards;
}

.auto-loan-widget-collapse.closing {
  animation: accordionOut 1.0s ease-in forwards;
  /* ensure it doesn't immediately disappear until animation finishes */
}

a.autoloan-calc-trig.btn-new { width: auto !important; }
.auto-loan-widget-collapse h2{ color: #000; text-align: center; line-height: 1; padding-top: 20px; position:relative;}
.auto-calculator-collapse .mc-row{ /*background: #14377E;*/ padding: 10px; display:flex; }
.auto-calculator-collapse .mc-col{ /*display: inline-block;*/ flex-grow: 1; padding: 10px; vertical-align: top; width: 25%; }
.auto-calculator-collapse .mc-col label{ color: #FFF; font-size: 18px; line-height: 18px; margin-bottom: 10px; }
.auto-calculator-collapse .mc-col label.lbl-payment-period{ margin-bottom: 10px; }
.auto-calculator-collapse .mc-col input,
.auto-calculator-collapse .mc-col .i_rate{ background: #FFF; border: 0; border-width: 0 0 1px 0; border-style:solid; border-color:#FFF; border-radius: 0; box-shadow:none; color: #101820; font-size: 18px; line-height: 30px; position: relative; width: 100% !important; width: -webkit-fill-available; color: #101820; }
.auto-calculator-collapse .mc-col select{ background: #FFF; border: 0; border-width: 0 0 1px 0; border-style:solid; border-color:#FFF; border-radius: 0;box-shadow:none; color: #101820; font-size: 18px; height: 45px; line-height: 36px; width: 100% !important; width: -webkit-fill-available; }
.auto-calculator-collapse .mc-col select option { color:#FFF; }
.auto-calculator-collapse .mc-col input#a_amount,
.auto-calculator-collapse .mc-col input#d_payment{ padding-left: 20px; }
.auto-calculator-collapse .mc-col .dollar-wrapper{ position: relative; }
.auto-calculator-collapse .mc-col .dollar-wrapper span.dollar-sign{ color: #101820; font-size: 18px; position: absolute; left: 5px; line-height: 30px; top: 6px; }
.auto-calculator-collapse .text-align-center { text-align: center; }  
.auto-calculator-collapse #result .a-monthly-payment{ color: #b0e0e0; display: block; font-size:20px; font-weight: 600; margin-right: 35px; vertical-align: middle; padding:10px; }
.auto-calculator-collapse #result #r_amount{ color: #c66837; font-family: 'ATF Poster Gothic'; font-weight: 900; font-size: 55px;  height:60px; line-height: 60px; position: relative; vertical-align: middle; width:200px; display: inline-block; border-bottom:1px solid #FFF; text-align: center; }
.auto-calculator-collapse #result #r_amount:before{ content:'$'; left: -25px; position: absolute; top: 0px; }
.smallest {
  font-size: 13px;
  font-weight: normal;
  line-height: 12px;
}
ul.accordion {}
ul.accordion li &amp;gt; a.accordion-title { margin-bottom: 1px; }
ul.accordion li.is-active a { background:white !important; color:#FFF; border:1px solid #ce4a0d; }
ul.accordion li.is-active a:before { color:#ce4a0d; }

.modal-hidden { visibility: hidden; }

.modal-body { padding: 0; }

.container.loaded {
    box-shadow: none;
}
.hs-form_theme-round .hs-form__field__input {
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
}
.hs-form__field__input {
    color: #33475b;
    background-color: #f5f8fa;
    border: 1px solid #959494;
}

@media (max-width:900px){
  .calculator-result-modal {
    position: relative !important;
  }  
}
@media (max-width:768px){
  .modal-hidden { visibility: visible; }
  
  .auto-calculator-collapse .mc-col {
    width: 25%;
  }
  
  .auto-loan-widget-collapse.active {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    opacity: unset;
    animation: none;
  }  
  
  
   .calc-side:first-child {
      flex-direction: row;
      align-items: baseline;
      justify-content: space-around;
   }  

}
@media (max-width:640px){
  .auto-loan-widget-collapse h2 { padding-top: 40px; }
  .auto-calculator-collapse .mc-row {
    display: block;
  }
  
  .auto-calculator-collapse .mc-row:first-child {
    margin-bottom: 0px;
    padding-bottom: 0px;
  }

  .auto-calculator-collapse .mc-row:nth-child(2) {
    margin-top: 0px;
    padding-top: 0px;
  }
  
  .auto-calculator-collapse .mc-col {
    width: 100%;
    float: none;
  }
  
    .calc-side:first-child {
      flex-direction: column;
   }  


  
}

  .calculator-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  .calc-modal {
    background: #fff;
    /*max-width: 1100px;*/
    width: 90%;
    padding: 1.5rem;
    border-radius: 8px;
    position: relative;
  }

  .calc-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .calc-modal-open {
    cursor: pointer;
  }



    .calculator-container {
      display: flex;
      background: #fff;
      /*border-radius: 16px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1); */
      overflow: hidden;
      /*max-width: 1200px; */
      width: 100%;
    }
    /* Left section: Rate & Payment */
    .calc-side {
      flex: 0 0 200px;
      /*padding: 2rem; */
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: left;
      text-align: left;
    }
    .calc-side h2 {
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: 1px;
      margin-bottom: 0.5rem;
      text-transform: uppercase;
    }
    .calc-side .value {
      font-size: 4rem;
      /*font-weight: 900;
      color: #0b3d2e;
      line-height: 1;
      */
      margin-top: 10px;
      line-height: 35px;
      color: #c66837; 
      font-family: 'ATF Poster Gothic'; 
      font-weight: 900;     
    }
    .calc-side label {
      text-align: left;
    }
    .calc-side + .calc-center {
      /*border-left: 1px solid #e0e0e0; */
    }
    /* Center section: Title, description, stats */
    .calc-center {
      flex: 1;
      padding: 0 1rem;
      /* display: flex; */
      flex-direction: column;
      justify-content: center;
      border-right: 4px solid rgb(198, 104, 55);
    }
    .calc-center .header {
      text-align: center;
      margin-bottom: 1.5rem;
    }
    .calc-center .header h1 {
      /*font-size: 2rem;
      margin-bottom: 0.5rem; */
      font-size:50px;color: #0b3d2e;margin-bottom: 20px;
    }
    .calc-center .header p {
      /*font-size: 0.9rem;
      color: #555; */
      font-size: 18px;margin-bottom: 0;
    }
    .stats {
      display: flex;
      flex-wrap: wrap;
      /*justify-content: space-between; */
      /*margin-top: 2rem; */
    }
    .stat-item {
      flex: 0 0 33%;
      margin-bottom: 1.5rem;
    }
    .stat-item label {
      display: block;
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 0.25rem;
      text-transform: uppercase;
    }
    .stat-item .stat-value {
      font-size: 2rem;
      font-weight: 900;
      color: #0b3d2e;
      line-height: 1;
      font-family: 'ATF Poster Gothic';
    }
    /* Right section: Email form */
    .calc-side.right {
      flex: 0 0 450px;
      /*padding: 2rem;*/
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .calc-side.right h2 {
      font-size: 1rem;
      font-weight: 700;
      text-transform: uppercase;
      margin-bottom: 1rem;
    }
    .calc-side.right form {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }
    .form-group {
      display: flex;
      flex-direction: column;
    }
    .form-group label {
      font-size: 0.85rem;
      font-weight: 600;
      margin-bottom: 0.25rem;
    }
    .form-group input {
      padding: 0.5rem;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-size: 1rem;
    }
    .form-group input:focus {
      outline: none;
      border-color: #0b3d2e;
    }
    .btn-send {
      margin-top: 1rem;
      padding: 0.75rem;
      background: #0b3d2e;
      color: #000;
      border: none;
      border-radius: 6px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      align-self: flex-end;
    }
    .btn-send:hover {
      background: #09402a;
    }

    .footnote { text-align: center;font-size: 13px; }
    /* Responsive adjustments */
    @media (max-width: 900px) {
      .calculator-container {
        flex-direction: column;
      }
      .calc-side, .calc-side.right {
        flex: none;
        width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding-top: 30px;
      }
      .calc-side:first-child {
        border-top: none;
      }
      .calc-center {
        padding: 2rem 0;
        border-right: none;
      }
      .calc-center .header h1 {
        line-height: 2.80rem
      }
      .calc-center .header {
        text-align: left;
        margin-top: 20px;
      }
      .stat-item {
        flex: 0 0 45%;
      }      
    }