:root {
  --primary: #9c3;
  --secondary: #404145;
  --black: #000;
  --font: "Poppins", Sans-serif;
}

body {
  font-family: var(--font) !important;
}

.css-container {
  border-radius: 10px;
  box-shadow: 3px 4px 19.6px 0px #00000021;
  padding: 80px 40px 40px 40px;
  max-width: 80vw;
  margin: 0 auto;
}

.flex-row {
  display: flex;
  flex-direction: row;
  gap: 4%;
}
.ccs-branding {
    width: 225px;
    height: 106px;
    margin: 0 auto;
    box-shadow: 0px 2px 4px 0px #00000017;
    border-radius: 10px;
    margin-bottom: -3%;
    background: #fff;
    z-index: 2;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
.ccs-heading {
  font-size: 24px;
  color: var(--black);
  text-transform: uppercase;
  font-weight: 600;
}
.ccs-family-container,
.ccs-child-section {
  width: 50%;
}
.ccs-family,
.ccs-child {
  box-shadow: 3px 4px 19.6px 0px #00000021;
  padding: 25px;
  border-radius: 10px;
  min-height: 525px;
}
input[type="radio"] {
  display: none;
}
.card,
.card-button {
  cursor: pointer !important;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
  /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); */
  border: 2px solid #efefef;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1 !important;
}
.card {
  padding: 20px 20px;
  background-color: var(--secondary);
  flex: 1 1 calc(50% - 2%); /* fallback for 1-2 items */
  max-width: calc(50% - 2%);
  position: relative;
}
.ccs-fee-badge {
  background: var(--secondary);
  height: 70px;
  width: 70px;
  border-radius: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  position: absolute;
  top: -32px;
  right: -15px;
  font-size: 12px !important;
}
.card-button {
    display: initial!important;
    padding: 15px 20px;
    background-color: #fff;
    margin: 0 !important;
}
.card img {
  margin-bottom: 10px;
}

.card span {
  font-size: 16px;
  color: #fff;
  transition: opacity 0.3s ease;
}

input[type="radio"]:checked + label {
  background-color: var(--primary);
  border: 2px solid transparent;
}

input[type="radio"]:checked + label img,
input[type="radio"]:checked + label span {
  opacity: 1;
}

input[type="radio"]:checked + label span {
  color: #fff;
}

.ccs-form-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.custom-label {
  line-height: 1.4rem;
  font-size: 14px;
}
.i-icon {
  width: 22px;
  cursor: pointer;
  position: relative;
  top: 5px;
}
.input-group {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
}

.ccs-button,
.custom-field,
.slider {
  border-radius: 0.6rem !important;
  border: 2px solid #d7d7d7 !important;
  font-weight: 600 !important;
  color: var(--primary) !important;
  height: 48px!important;
  margin-bottom: 0 !important;
}
.ccs-button:hover,
.ccs-button:active,
.ccs-button:visited,
.ccs-button:focus {
  background-color: transparent !important;
}
.ccs-button {
  position: relative!important;
  padding: .5rem 1rem !important;
  background-color: transparent!important;
  margin-top: 0!important;
}
.lg {
  width: 100% !important;
}
.md {
  width: 50% !important;
}
.sm {
  width: 30% !important;
}

.slider-wrapper {
  box-shadow: 3px 4px 19.6px 0px #00000021;
  padding: 10px;
  border-radius: 10px;
}
.slider-bar {
  background-color: var(--primary);
  padding: 10px 20px;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
}
.slider-value,
.slider-yearly {
  width: 50%;
  text-align: right;
}

/* slider */
.range {
  position: relative;
  width: 100%;
}

input[type="range"].slider {
  -webkit-appearance: none;
  width: 100%;
  height: 40px;
  border-radius: 8px;
  outline: none;
  margin: 0;
  background: linear-gradient(
    to right,
    white 0%,
    white 33.33%,
    #37a4ed 33.33%,
    #37a4ed 100%
  );
}

/* Track styling */
input[type="range"].slider::-webkit-slider-runnable-track {
  height: 48px;
  border-radius: 8px;
  background: transparent; /* handled by input background */
}
input[type="range"].slider::-moz-range-track {
  height: 48px;
  border-radius: 8px;
  background: transparent;
}

/* Hide the thumb */
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 48px;
  width: 20px;
  background: var(--primary); /* matches the background */
  border: 2px solid white;  /* makes it stand out */
 border-radius: 10px;
  cursor: pointer;
}
.slider::-moz-range-thumb {
  height: 48px;
  width: 20px;
  background: var(--primary);
  border: 2px solid white;
 border-radius: 10px;
  cursor: pointer;
}

/* Vertical bars */
.vertical-bars {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  position: relative;
  padding: 0 12px;
}

.vertical-bars span.bar {
  display: block;
  width: 2px;
  height: 14px;
  background-color: #4d4d4d;
}
#main-bar {
  height: 28px;
  background-color: var(--primary);
}

/* Labels below bars */
.labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 14px;
  color: #333;
  padding: 0 6px;
}

.inputs {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 20px;
}

.input-symbol {
  margin-right: 5px;
  font-weight: bold;
}

.family-icome-label {
  border: 2px solid #d7d7d7 !important;
  border-radius: 8px;
  padding: 0 5px;
  width: 35% !important;
}

.value-display {
    border: none !important;
    border-left: 2px solid #d7d7d7 !important;
    background-color: #fff !important;
    font-weight: 600 !important;
    margin: 0 !important;
}
.ccs-custom-btn {
  background-color: var(--primary) !important;
  position: relative !important;
  font-size: 14px !important;
  padding: 10px 10px !important;
  border-radius: 10px !important;
  border: none !important;
  color: #fff !important;
  margin-top: 1rem !important;
  text-transform: uppercase;
  text-decoration: none !important;
}

#calculate-subsidy {
  width: 40%;
  margin: 0 auto;
}
.ccs-helppli-branding {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}
.ccs-helppli-branding > p > a > img {
  width: 35%;
}
.ccs-helppli-branding > p > a {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #000;
  text-decoration: none;
}
.ccs-devider {
  opacity: 0.3;
}
.ccs-spacer {
  margin-top: 4rem;
}
.ccs-helppli-branding > p {
  margin-bottom: 0;
  text-align: center;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.child-form {
  margin-bottom: 2rem;
}

.logo img {
  width: 120px;
  margin-bottom: 20px;
}

.badge-section {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-bottom: 20px;
}

.badge {
  background-color: var(--primary);
  color: white;
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.badge strong {
  font-size: 18px;
}

.table-row {
  display: flex;
  background: #f0f0f0;
  margin-bottom: 1rem;
  border-radius: 15px;
}

.table-row.header {
  background-color: transparent;
}

.title-cell {
  flex: 2;
  padding: 12px 15px;
}

.data-cell {
  flex: 1;
  padding: 12px 15px;
  text-align: right;
}
.ccs-bottom-section {
  display: flex;
  justify-content: center;
}
/* Modal overlay (backdrop) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal content */
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Modal header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
/* The overlay itself */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10; /* Ensure it appears above other elements */
}

/* Spinner styles */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #ccc;
  border-top-color: #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
/* Hidden class to hide overlay */
.hidden {
  display: none;
}
.custom-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 0.6rem !important;
  border: 2px solid #d7d7d7 !important;
  padding: 0.2rem 1.5rem;
  width: 100%;
  height: 50px;
}

.custom-select-icon {
  background-color: var(--primary);
  display: inline-block;
  border-radius: 4px;
  margin-right: 10px;
  padding: 5px 10px;
}

.custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
  background: transparent;
  padding-right: 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  margin: 0!important;
}
.custom-select:focus {
  box-shadow: none!important;
  border: none!important;
  outline: none;
  background-color: transparent!important;
}

.custom-arrow {
  position: absolute;
  right: 1rem;
  pointer-events: none;
  font-size: 3rem;
  color: var(--primary);
}

/* Spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* accordian styles */

@media (max-width: 768px) {
  #subsidy-form > .flex-row {
    flex-direction: column;
  }
  .ccs-family-container,
  .ccs-child-section {
    width: 100%;
  }
  .ccs-family-container {
    margin-bottom: 50px;
  }
  #calculate-subsidy {
    width: 100%;
  }
  .ccs-family,
  .ccs-child {
    padding: 15px;
  }
  .css-container {
    padding: 40px 20px 40px 20px;
  }
  .family-icome-label {
    width: 100%;
  }
  .ccs-carousel-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ccs-carousel {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    padding-bottom: 10px;
    margin-top: 33px;
  }
  .card {
    flex: 0 0 50%;
    max-width: 50%;
    min-width: 50%;
  }
  .sm {
    width: 100% !important;
  }
  .card,
  .card-button {
    font-size: 11px;
    padding: 16px 18px;
  }
  #mobile-align {
    justify-content: space-around;
  }
}