#expert-contact-modal.show{
  background-color: rgba(0, 0, 0, 0.33) !important;
  margin-bottom: 25vh !important;
}

#expert-contact-modal.closing .modal-content {
  display: none;
}

body.modal-open,
body:has(#expert-contact-modal.show) {
  overflow: hidden !important;
}

html:has(#expert-contact-modal.show) {
  overflow: hidden !important;
}

#expert-contact-modal.show ~ .modal-backdrop,
body:has(#expert-contact-modal.show) .modal-backdrop {
  overflow: hidden !important;
  pointer-events: auto !important;
}

#expert-contact-modal.show .modal-content{
  padding: 40px;
  background-color: white;
  top: 15vh;
  max-width: 885px;
  max-height: 70vh;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Laptop / smaller desktop */
@media (max-width: 1400px) {
  #expert-contact-modal.show .modal-content {
    /* max-width: 90vw; */
    padding: 24px;
    top: 5vh;
    max-height: 90vh;
  }

  #expert-contact-modal.show .modal-title {
    font-size: 26px;
    margin-bottom: 16px;
  }

  #expert-contact-modal.show .close {
    top: 12px;
    right: 12px;
  }
  #expert-contact-modal.show .modal-body{
    margin-top:20px;
  }
}

#expert-contact-modal .gform_wrapper.gravity-theme .gfield_radio .gchoice:not(.gfield--type-quiz .gfield_radio .gchoice){
  flex:1;
}

#expert-contact-modal .gform_wrapper.gravity-theme .gfield.gfield--width-half{
  flex:1;
  max-width: unset;
}

#expert-contact-modal .gform_wrapper.gravity-theme .gform_fields{
  min-width: 100%;
}

#expert-contact-modal.show .modal-header{
  padding:0 !important;
  border-bottom: 0;
}

#expert-contact-modal.show .modal-body{
  padding:0 !important;
  border-bottom: 0;
}

/* Custom scrollbar for modal content */
#expert-contact-modal.show .modal-content::-webkit-scrollbar {
  width: 10px;
}

#expert-contact-modal.show .modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 5px 5px 0;
}

#expert-contact-modal.show .modal-content::-webkit-scrollbar-thumb {
  background: #B7B7B7;
  border-radius: 5px;
}

#expert-contact-modal.show .modal-content::-webkit-scrollbar-thumb:hover {
  background: #9a9a9a;
}
#expert-contact-modal.show .close {
  width: auto;
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#expert-contact-modal.show .close svg {
  display: block;
}

#expert-contact-modal.show .modal-title {
  color: #002B46;
  font-family: Inter;
  font-size: 32px;
  margin-bottom: 24px;
}

.expert-details-block {
  border-radius: 8px;
  background: #EBEBEB;
  padding: 8px;
  margin-bottom: 24px;
  display: none;
}

.expert-details-block:not(:empty) {
  display: block;
}

.expert-details-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.expert-details-image-wrapper {
  position: relative;
  display: inline-block;
}

.expert-details-image {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
}

.expert-details-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background-color: #00B5D3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expert-details-badge svg {
  width: 10px;
  height: 10px;
  margin-top: 2px;
}

.expert-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.expert-details-name {
  font-family: Demo;
  font-size: 20px;
  font-weight: 400;
  color: #002b46;
  margin: 0;
}

.expert-details-job {
  font-family: Inter;
  font-size: 16px;
  color: #002b46;
  margin: 0;
}

.expert-contact-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.expert-contact-item {
  font-family: Inter;
  font-size: 16px;
  font-weight: normal;
  font-stretch: normal;
  font-style: normal;
  line-height: 1.56;
  letter-spacing: normal;
  color: #002c45;
}

.expert-phone-item:before {
  display: inline-block;
  content: '';
  background-image: url("../icons/phone-icon.svg");
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

.expert-email-item:before {
  display: inline-block;
  content: '';
  background-image: url("../icons/email-icon.svg");
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  background-size: contain;
}

@media (max-width: 768px) {
  .expert-details-block {
    padding: 12px;
    margin-bottom: 20px;
  }

  .expert-details-row {
    gap: 24px;
  }

  .expert-details-image {
    width: 60px;
    height: 60px;
    min-width: 60px;
  }

  .expert-details-name {
    font-size: 20px;
  }

  .expert-details-job {
    font-size: 14px;
  }

  .expert-contact-item {
    font-size: 14px;
  }

  #expert-contact-modal.show .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    height: 100vh;
  }

  #expert-contact-modal.show .modal-content {
    top: 0 !important;
    max-height: 100vh;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 20px;
    border-radius: 0 !important;
    border: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
  }

  #expert-contact-modal.show .modal-header {
    margin-top: 20px !important;
  }

  /* Hide scrollbar but allow scrolling */
  #expert-contact-modal.show .modal-content::-webkit-scrollbar {
    display: none;
  }

  #expert-contact-modal.show .modal-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  #expert-contact-modal.show .gform_wrapper.gravity-theme .gfield_radio .gchoice:not(.gfield--type-quiz .gfield_radio .gchoice) {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }

  #expert-contact-modal.show .gform_wrapper.gravity-theme .gfield.gfield--width-half {
    flex: 0 0 100%;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}
