/* Extracted from the WordPress page's Elementor custom CSS (bah-calculator). */
.legacy-calc .bah-calc {
  width: 980px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  gap: 12px;
  padding: 64px 0 0 0;
}
.legacy-calc .container {
  width: 100%;
  display: flex;
  box-sizing: border-box;
  padding: 0;
}
.legacy-calc .calc-side {
  width: 50%;
  border: 1px solid #d7d7d7;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
  position: relative;
}
.legacy-calc .left-side {
  background: #f5f5f5;
  border-radius: 8px 0 0 8px;
  border: none;
}
.legacy-calc .right-side {
  padding-top: 24px;
  border-radius: 0 8px 8px 0;
}
.legacy-calc form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.legacy-calc #bah-paygrade{
    color: #dddddd;
}
.legacy-calc #bah-paygrade option{
    color: #3f444b;
}
.legacy-calc #bah-paygrade:not(:valid){
    color: #dddddd;
}
.legacy-calc #bah-paygrade:valid{
    color: #3f444b;
}
.legacy-calc #bah-paygrade::placeholder {
    color: #dddddd !important;
}
.legacy-calc #bah-paygrade::-webkit-input-placeholder {
    color: #dddddd;
}
.legacy-calc #bah-paygrade::-moz-placeholder  {
    color: #dddddd;
}
.legacy-calc #bah-paygrade:-ms-input-placeholder {
    color: #dddddd;
}
.legacy-calc #bah-paygrade option:disabled {
    color: #dddddd !important;
}

.custom-select {
  position: relative;
}

.custom-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font-size: 18px;
  font-family: "adelle-sans", sans-serif;
  padding: 12px 12px 12px 12px;
  background-color: #ffffff;
  border: 1px solid #efe7ec;
  border-radius: 8px;
  color: #3f444b;
  cursor: pointer;
  outline: none;
  box-shadow: 0px 1px 2px 0px #edf0f8;
}

.custom-select select:focus {
  background: #f5f5f5;
  border: 1px solid #61b4e4;
  border-radius: 6px;
}

.custom-select::after {
  content: "";
  position: absolute;
  pointer-events: none;
  top: 50%;
  right: 10px;
  transform: translate(0, -50%);
  width: 12px;
  height: 12px;
  background-color: #3f444b;
  clip-path: polygon(
    50% 0%,
    100% 40%,
    0% 60%,
    100% 60%,
    50% 100%,
    0% 60%,
    100% 40%,
    0% 40%
  );
}

.legacy-calc .custom_input {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 100%;
}

.legacy-calc .input {
  font-size: 18px;
  font-family: "adelle-sans", sans-serif;
  padding: 12px 12px;
  width: 100%;
  padding-left: 35px;
  outline: none;
  background: #ffffff;
  color: #3f444b;
  border: 1px solid #efe7ec;
  border-radius: 8px;
  box-shadow: 0px 1px 2px 0px #e2e2e2;
  transition: 0.3s ease;
}

.legacy-calc .input:focus {
  background: #f2f2f2;
  border: 1px solid #61b4e4;
  border-radius: 8px;
}

.legacy-calc .input::placeholder {
  color: #dddddd;
}

.legacy-calc .svg_icon {
  position: absolute;
  left: 12px;
  fill: #61b4e4;
  width: 16px;
  height: 16px;
}


.legacy-calc svg {
  font-family: "Russo One", sans-serif;
  width: 100%;
  max-height: 48px;
}
.legacy-calc svg text {
  animation: stroke 5s infinite alternate;
  stroke-width: 0.5;
  stroke: #3f444b;
  font-size: 28px;
}
@keyframes stroke {
  0% {
    fill: rgba(97, 180, 228, 0.2);
    stroke: rgba(63, 68, 75, 1);
    stroke-dashoffset: 25%;
    stroke-dasharray: 0 50%;
    stroke-width: 0.5;
  }
  60% {
    fill: rgba(97, 180, 228, 0.1);
    stroke: rgba(63, 68, 75, 1);
  }
  70% {
    fill: rgba(97, 180, 228, 0.1);
    stroke: rgba(63, 68, 75, 1);
    stroke-width: 1;
  }
  100% {
    fill: rgba(97, 180, 228, 1);
    stroke: rgba(63, 68, 75, 0);
    stroke-dashoffset: -25%;
    stroke-dasharray: 50% 0;
    stroke-width: 0;
  }
}
.legacy-calc .output-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.legacy-calc .output-header-wrapper h2 {
  color: #3f444b;
  font-family: "adelle-sans", sans-serif;
  margin: 0.5em 0 0.25em 0;
}
.legacy-calc .output-header-wrapper hr {
  color: #f7f7f7;
  margin: 12px 0;
}
.legacy-calc .output-subheader-wrapper {
  background-color: #ffffff;
  height: auto;
  width: auto;
}
.legacy-calc .output-group-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.legacy-calc .output-label {
  font-size: 12px;
  color: #3f444b;
  font-family: "adelle-sans", sans-serif;
  text-transform: uppercase;
    display: flex;
  column-gap: 24px;
  justify-content: space-between;
  padding: 0 0 2px 0;
  line-height: 1.25em;
}
.legacy-calc .difference-stmt {
  padding: 2px 6px;
  background: #fff;
  border-radius: 4px;
  display: none;
  text-transform: lowercase;
}
.legacy-calc .difference-stmt.increase {
  background: #dcedc8;
}
.legacy-calc .difference-stmt.decrease {
  background: #ffcdd2;
}
.legacy-calc .output-row {
  display: flex;
  flex-direction: column;
}
.legacy-calc .value-row {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
}
.legacy-calc .output-box {
  padding: 12px 24px;
  width: 50%;
  background-color: #f5f5f5;
  border-radius: 4px;
  transition: all 0.7s ease-in;
}
.legacy-calc .output-box.active-output {
  background-color: #61b4e4;
}
.legacy-calc .output-value {
  display: flex;
  text-align: center;
  justify-content: center;
  align-items: center;
  width: 100%;
  color: #c7c7c7;
  font-weight: 400;
  font-family: "adelle-sans", sans-serif;
}
.legacy-calc .output-box.active-output .output-value {
  color: #ffffff;
  font-weight: 700;
}
.legacy-calc .custom-loader {
  width: 76px;
  height: 18px;
  display: flex;
}
.legacy-calc .custom-loader:before,
.legacy-calc .custom-loader:after {
  content: "";
  flex: 1;
  background: radial-gradient(farthest-side, #a6d3f1 90%, #0000) center/12px
      100%,
    radial-gradient(farthest-side at right, #a6d3f1 90%, #0000) right / 6px 100%;
  background-repeat: no-repeat;
  transform: scale(var(--s, 1)) translate(0px) rotate(0);
  animation: d10 1.5s infinite;
}
.legacy-calc .custom-loader:after {
  --s: -1;
}

@keyframes d10 {
  25% {transform: scale(var(--s, 1)) translate(-10px) rotate(0); }
  50% {transform: scale(var(--s, 1)) translate(-10px) rotate(1turn);}
  75%,
  100% {
    transform: scale(var(--s, 1)) translate(0px) rotate(1turn);
  }
}
/* glitch effect */
.legacy-calc .output-subheader-wrapper {
  width: 100%;
  height: 48px;
  display: flex;
flex-direction:column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  background-color: #ffffff;
}

.halwn .glitch {
  position: relative;
  font-size: 32px;
  font-weight: bold;
  font-family: "adelle-sans", sans-serif;
  color: #3f444b;
  letter-spacing: 3px;
  z-index: 1;
}
.legacy-calc .halwn .output-subheader-wrapper {
    flex-direction: row;
}

.halwn .glitch:before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: -2px;
  width: 100%;
  color: 32px;
  background-color: #ffffff;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: noise-before 2.5s infinite linear alternate-reverse;
}

.halwn .glitch:after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 2px;
  width: 100%;
  color: 32px;
  background-color: #ffffff;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: noise-after 1.5s infinite linear alternate-reverse;
}

@keyframes noise-before {
  0% {
    clip: rect(61px, 9999px, 52px, 0);
  }
  5% {
    clip: rect(33px, 9999px, 144px, 0);
  }
  10% {
    clip: rect(121px, 9999px, 115px, 0);
  }
  15% {
    clip: rect(144px, 9999px, 162px, 0);
  }
  20% {
    clip: rect(62px, 9999px, 180px, 0);
  }
  25% {
    clip: rect(34px, 9999px, 42px, 0);
  }
  30% {
    clip: rect(147px, 9999px, 179px, 0);
  }
  35% {
    clip: rect(99px, 9999px, 63px, 0);
  }
  40% {
    clip: rect(188px, 9999px, 122px, 0);
  }
  45% {
    clip: rect(154px, 9999px, 14px, 0);
  }
  50% {
    clip: rect(63px, 9999px, 37px, 0);
  }
  55% {
    clip: rect(161px, 9999px, 147px, 0);
  }
  60% {
    clip: rect(109px, 9999px, 175px, 0);
  }
  65% {
    clip: rect(157px, 9999px, 88px, 0);
  }
  70% {
    clip: rect(173px, 9999px, 131px, 0);
  }
  75% {
    clip: rect(62px, 9999px, 70px, 0);
  }
  80% {
    clip: rect(24px, 9999px, 153px, 0);
  }
  85% {
    clip: rect(138px, 9999px, 40px, 0);
  }
  90% {
    clip: rect(79px, 9999px, 136px, 0);
  }
  95% {
    clip: rect(25px, 9999px, 34px, 0);
  }
  100% {
    clip: rect(173px, 9999px, 166px, 0);
  }
}

@keyframes noise-after {
  0% {
    clip: rect(26px, 9999px, 33px, 0);
  }
  5% {
    clip: rect(140px, 9999px, 198px, 0);
  }
  10% {
    clip: rect(184px, 9999px, 89px, 0);
  }
  15% {
    clip: rect(121px, 9999px, 6px, 0);
  }
  20% {
    clip: rect(181px, 9999px, 99px, 0);
  }
  25% {
    clip: rect(154px, 9999px, 133px, 0);
  }
  30% {
    clip: rect(134px, 9999px, 169px, 0);
  }
  35% {
    clip: rect(26px, 9999px, 187px, 0);
  }
  40% {
    clip: rect(147px, 9999px, 137px, 0);
  }
  45% {
    clip: rect(31px, 9999px, 52px, 0);
  }
  50% {
    clip: rect(191px, 9999px, 109px, 0);
  }
  55% {
    clip: rect(74px, 9999px, 54px, 0);
  }
  60% {
    clip: rect(145px, 9999px, 75px, 0);
  }
  65% {
    clip: rect(153px, 9999px, 198px, 0);
  }
  70% {
    clip: rect(99px, 9999px, 136px, 0);
  }
  75% {
    clip: rect(118px, 9999px, 192px, 0);
  }
  80% {
    clip: rect(1px, 9999px, 83px, 0);
  }
  85% {
    clip: rect(145px, 9999px, 98px, 0);
  }
  90% {
    clip: rect(121px, 9999px, 154px, 0);
  }
  95% {
    clip: rect(156px, 9999px, 44px, 0);
  }
  100% {
    clip: rect(67px, 9999px, 122px, 0);
  }
}

/* Halloween Decorations */
.spider-container {
  display: none;
}
.halwn .spider-container {
  display: block;
  width: 16px;
  position: absolute;
  top: 0;
  right: 22px;
}

.halwn #spider-1 {
  position: absolute;
  color: rgba(10,20,40,0.7);
  top: 0;
  right: 0;
  animation: moveVertical infinite 4.5s alternate
    cubic-bezier(0.49, -0.01, 0.14, 0.53);
}

.halwn .spider-web {
  position: absolute;
  top: 0;
  width: 2px;
  background-color: #e7e7e7;
  animation: spiderWeb infinite 4.5s alternate
    cubic-bezier(0.49, -0.01, 0.14, 0.53);
  left: 5px;
}

@keyframes moveVertical {
  0% {
    transform: translateY(0) rotate(180deg);
  }
  40% {
    transform: translateY(12px) rotate(180deg);
  }
  60% {
    transform: translateY(50px) rotate(180deg);
  }
  100% {
    transform: translateY(120px) rotate(180deg);
  }
}
@keyframes spiderWeb {
  0% {
    height: 0;
  }
  40% {
    height: 17px;
  }
  60% {
    height: 55px;
  }
  100% {
    height: 125px;
  }
}
@keyframes moveVerticalMobile {
  0% {
    transform: translateY(0) rotate(180deg);
  }
  40% {
    transform: translateY(6px) rotate(180deg);
  }
  60% {
    transform: translateY(25px) rotate(180deg);
  }
  100% {
    transform: translateY(60px) rotate(180deg);
  }
}
@keyframes spiderWebMobile {
  0% {
    height: 0;
  }
  40% {
    height: 11px;
  }
  60% {
    height: 30px;
  }
  100% {
    height: 65px;
  }
}
.legacy-calc .cta-wrapper {
  margin-top: 0;
  padding: 12px 24px;
  background-color: #f5f5f5;
  width: 100%;
  border-radius: 4px;
  display: flex;
  gap: 6px;
  justify-content: center;
  box-sizing: border-box;
}
.legacy-calc .cta-wrapper .cta-note {
  color: #3f444b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
}
.legacy-calc .cta-wrapper .cta-btn {
  border: 1px solid #f7931e;
  border-radius: 4px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  cursor: pointer;
  font-weight: 700;
  background-color: #f7931e;
  box-shadow: 0 4px 4px -1px rgba(36,104,147,0.1);
}
.legacy-calc .cta-wrapper .cta-btn:hover {
  transform: translateY(-1px);
  background-color: #f7931eaa;
}

/**
 * BAH Calculator v3_01 Enhancements CSS
 * Companion styles for calc_v3_01.js features
 */

/* Location name subheader below duty zone */
.legacy-calc .location-name-subheader {
  font-size: 0.85rem;
  color: #61b4e4;
  margin-top: 0;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: none;
  line-height: 1.4;
}

/* Adjust on smaller screens */
@media (max-width: 768px) {
  .legacy-calc .location-name-subheader {
    font-size: 0.75rem;
    margin-top: 0.35rem;
  }
}

/* Chrome autofill detection animation */
@keyframes onAutoFillStart {
  from { opacity: 1; }
  to { opacity: 1; }
}

@keyframes onAutoFillCancel {
  from { opacity: 1; }
  to { opacity: 1; }
}

.legacy-calc input:-webkit-autofill {
  animation-name: onAutoFillStart;
  transition: background-color 50000s ease-in-out 0s;
}

.legacy-calc input:not(:-webkit-autofill) {
  animation-name: onAutoFillCancel;
}

/* Wrapper highlight for better visibility */
.legacy-calc .custom-select.needs-selection-wrapper {
  border: 2px solid #ff4d4d;
  border-radius: 4px;
  padding: 2px;
  box-shadow: 0 0 16px rgba(255, 77, 77 0.6);
  background: rgba(52, 152, 219, 0.05);
}

/* Pulse animation for drawing attention to paygrade field */
@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(255, 77, 77, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
  }
}

/* Mobile-specific enhancements for paygrade indicator */
@media (max-width: 768px) {
  .legacy-calc .custom-select.needs-selection-wrapper {
    border: 3px solid #ff4d4d;
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.7);
    background: rgba(52, 152, 219, 0.1);
    margin: 4px 0;
  }

  /* More prominent pulse on mobile */
  @keyframes pulse-border {
    0% {
      box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.8);
    }
    50% {
      box-shadow: 0 0 0 20px rgba(255, 77, 77, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
    }
  }
}


/* Prevent animation jank */
.swal2-noanimation {
  animation: none !important;
}

/* Subtle glow effect for active location input */
.legacy-calc .bah-calc #bah-loc:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
  transition: box-shadow 0.15s ease-in-out;
}

/* Improve visual feedback for location input when autofilled */
.legacy-calc .bah-calc #bah-loc:-webkit-autofill,
.legacy-calc .bah-calc #bah-loc:-webkit-autofill:hover,
.legacy-calc .bah-calc #bah-loc:-webkit-autofill:focus {
  border: 2px solid #2ecc71;
  -webkit-box-shadow: 0 0 0px 1000px white inset;
  box-shadow: 0 0 0px 1000px white inset;
}

/* Accessibility: Ensure proper contrast for notifications */
.swal2-icon.swal2-info {
  border-color: #3498db;
  color: #3498db;
}

/* Make sure SweetAlert2 doesn't interfere with form interactions */
.swal2-container.swal2-backdrop-show {
  background: transparent !important;
}

@media screen and (max-width: 1224px) {
  .legacy-calc .bah-calc {
    width: auto;
    padding: 48px 0;
  }
  .bah-calc .output-header h2 {
    font-size: 28px;
  }
  .halwn .bah-calc .glitch {
    font-size: 22px;
  }
  .output-value {
    font-size: 18px;
  }
}
@media screen and (max-width: 920px) {
  .legacy-calc .bah-calc {
    width: 100%;
    padding: 32px 0;
  }
  .legacy-calc .bah-calc .container {
    flex-direction: column;
    width: 100%;
  }
  .legacy-calc .bah-calc .calc-side {
    width: 100%;
    padding: 32px 16px;
  }
  .legacy-calc .bah-calc .left-side {
    border-radius: 8px 8px 0 0;
  }
  .legacy-calc .bah-calc .right-side {
    border-radius: 0 0 8px 8px;
  }
  .legacy-calc .output-header {
    align-items: center;
  }
  .legacy-calc .bah-calc .output-header h2 {
    font-size: 24px;
  }
  .legacy-calc .output-subheader-wrapper {
    justify-content: center;
    text-align: center;
  }
  .legacy-calc .halwn .bah-calc .glitch {
    font-size: 20px;
  }
  .legacy-calc .bah-calc .output-box{
    padding: 8px;
  } 
  .legacy-calc .bah-calc .output-value {
    font-size: 14px;
  }
  .legacy-calc .bah-calc .cta-wrapper {
      padding: 12px;
      flex-direction: column;
  }
  .legacy-calc .bah-calc .cta-note {
      font-size: 18px;
      flex: 1 1 0;
      line-height: 1.1em;
  }
  .legacy-calc .bah-calc .cta-btn {
    flex: 1 1 1;
    font-size: 16px;
    padding: 8px 12px;
    background-color: #61b4e4;
    border: 1px solid #61b4e4;
  }
  .legacy-calc .bah-calc .cta-btn:hover {
    background-color: #61b4e4aa;
    border: 1px solid #61b4e4;
  }
   .legacy-calc .halwn #spider-1 {
    animation: moveVerticalMobile infinite 4.5s alternate
      cubic-bezier(0.49, -0.01, 0.14, 0.53);
  }

  .legacy-calc .halwn .spider-web {
    animation: spiderWebMobile infinite 4.5s alternate
      cubic-bezier(0.49, -0.01, 0.14, 0.53);
  }
}
.wv-unused-elementor-wrapper  {
    line-height: 0.7em !important;
}
#bah-details-form-modal {
    display: none;
}
#bah-details-form-modal.open {
    display:flex;
}
.bah-modal-close {
    cursor: pointer;
}
.bah-modal-close:hover {
    color: #3f444b;
    fill: #3f444b;
}
.calc-wrapper .email-bah-btn {
    background-color: #61b4e4;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 4px -1px rgba(36,104,147,0.1);
}
.calc-wrapper .email-bah-btn:hover {
    background-color: #61b4e4aa;
    transform: translateY(-1px);
}
.calc-wrapper .email-bah-btn-wrapper.mobile-ver .email-bah-btn {
    background-color: #f7931e;
    font-size: 16px;
    padding-top: 8px;
    padding-bottom: 8px;
}
.calc-wrapper .email-bah-btn-wrapper.mobile-ver .email-bah-btn:hover {
    background-color: #f7931eaa;
}

.calc-wrapper .email-bah-btn-wrapper.mobile-ver {
    display: none;
}
#bah-email-form button {
    background-color: #f7931e;
    line-height: 1em;
    padding-top: 14px;
    padding-bottom: 14px;
}
#bah-email-form button:hover {
    background-color: #f7931eaa;
    transform: translateY(-1px);
}
@media screen and (max-width:767px){
    #bah-details-form-modal .form-field-wrapper {
        flex-direction: column;
    }
    #bah-details-form-modal .form-field-wrapper button {
        width: 100%;
    }
    
  .calc-wrapper .email-bah-btn-wrapper.desktop-ver {
    display:none;
    }
.calc-wrapper .email-bah-btn-wrapper.mobile-ver {
    display: block;
}  
}
.legacy-calc span:hover {
    cursor: pointer;
}
.legacy-calc a.link-chevron-right {
    color: #f7931e;
    line-height: 36px;
}
.legacy-calc .elementor-toggle-item:last-of-type .elementor-tab-title {
    border-bottom: none !important;
}
.legacy-calc .elementor-toggle-item:last-of-type .elementor-tab-content {
    border-bottom: none !important;
}
.legacy-calc p {
    max-width: 90ch;
}
body.swal2-toast-shown .swal2-container.swal2-top-end {
    background-color: transparent !important;
    width: 520px;
}
.swal2-popup {
 /* position: relative; */
 /* top:3vh; */
}
@media screen and (max-width: 767px){
    body.swal2-toast-shown .swal2-container.swal2-top-end {
    width: 100%;
}
}