.modal-dialog {
  max-width: 60vw !important;
  width: 60vw !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: auto;
  margin-right: auto;

}

.modal-content {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  border-top: 0 !important
}

.modal-body {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-x: auto;
  padding: 10px 10px;
}


.modal-body p {
  max-width: 100%;
  word-break: break-word;
}

.modal-body li {
  word-break: break-word;
  margin-bottom: 8px;
}

.modal-body pre {
  white-space: pre-wrap;
  word-break: break-all;
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  overflow-x: auto;
}




body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0;
  font-size: 16px;
  background-color: #a2c0a9;
}

.container-fluid {
  flex: 1 0 auto;
  /* Grow but don't shrink, auto basis */
  padding: 15px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.app-header {
  text-align: center;
  margin-bottom: 20px;
}

.app-logo {
  width: 80px;
  height: auto;
  margin-bottom: 10px;
}

.app-title {
  font-size: 1.8em;
  font-weight: bold;
}

.btn-start {
  background: #006633;
  font-size: 1.5em;
  padding: 20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
}

.btn-start.active {
  background: #006633 !important;
}

.btn-start:hover {
  background: #006633 !important;
}

.question-container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

.question-text {
  font-size: 1.5em;
  margin-bottom: 30px;
  font-weight: bold;
}

@media screen and (max-width: 768px) {
  .question-text {
    font-size: 1em;
  }
}

@media screen and (max-width: 768px) {
  .app-title {
    font-size: 1.3em;
  }
}



#ind_out_calving .btn-group-container,
#cost_option .btn-group-container,
#yearly_breakdown .btn-group-container,
#yearly_breakdown_with_mit .btn-group-container,
#r1_herds .btn-group-container,
#purchased_blood_dung .btn-group-container,
#high_blood_dung .btn-group-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 20px 0 !important;
}

#ind_out_calving .btn,
#cost_option .btn,
#yearly_breakdown .btn,
#yearly_breakdown_with_mit .btn,
#r1_herds .btn,
#purchased_blood_dung .btn,
#exclude_test_positive .btn,
#sell_isolate .btn,
#high_blood_dung .btn {
  font-size: 1.2em !important;
  width: 100% !important;
  height: auto !important;
  min-height: 60px !important;
  padding: 10px !important;
  margin: 10px 0 !important;
  white-space: normal !important;
}


#backBtn,
#nextBtn,
#compBtn,
#backBtnNoMit,
#backBtnMit,
#backBtnT,
#barplotBtn,
#backBtnP {
  font-size: 1.5em !important;
  padding: 10px 20px !important;
  margin-top: 20px !important;
  border-radius: 15px !important;
}

#backBtn,
#backBtnNoMit,
#backBtnMit,
#backBtnT,
#backBtnP {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: white !important;
}

#nextBtn,
#compBtn,
#barplotBtn {
  background-color: #006633 !important;
  border-color: #006633 !important;

}

.irs {
  margin: 0 auto !important;
  width: 100% !important;
}

.shiny-input-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  margin: 0 auto !important;
}

.irs-grid-text {
  font-size: 1rem !important;
}

.irs-single {
  font-size: 1rem !important;
}

.irs-bar {
  height: 8px !important;
}

.shiny-input-container input[type='number'] {
  width: 100% !important;
  font-size: 1.2em !important;
  padding: 10px !important;
  text-align: center;
}

.irs-bar,
.irs-single,
.irs-from,
.irs-to {
  background-color: #006633 !important;
}

#herd_status .btn-group-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}

#herd_status .btn-group {
  width: 100% !important;
  margin: 5px 0 !important;
}

#herd_status .btn {
  font-size: 2rem !important;
  padding: 15px 10px !important;
  min-width: 100% !important;
  height: auto !important;
  white-space: normal !important;
}

@media (max-width: 768px) {
  #herd_status .btn {
    font-size: 1.5rem !important;
    padding: 10px 5px !important;
    height: auto !important;
    min-height: 60px !important;
  }
}

.footer {
  flex-shrink: 0;
  /* Prevent footer from shrinking */
  width: 100%;
  padding: 10px;
  font-size: 1.2em;
  text-align: center;
}

@media (max-width: 768px) {
  .footer {
    font-size: 0.8em;
    padding: 8px;
  }


  .container-fluid {
    padding: 10px;
  }
}

* Add site map styles */ .site-map {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0;
  gap: 10px;
}

.site-map a {
  text-decoration: none;
  color: black;
  font-size: 1.5em;
  white-space: nowrap;
}

.site-map a:not(:last-child)::after {
  content: '|';
  margin-left: 10px;
  color: #000;
}

.site-map a:hover {
  text-decoration: underline;
}

.site-map a.active {
  font-weight: bold;
  color: #006633 !important;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .site-map {
    font-size: 0.6em;
    gap: 5px;
  }

  .site-map a:not(:last-child)::after {
    margin-left: 5px;
  }
}

a {
  color: #006633 !important;
}

a.active a:hover {
  font-weight: bold;
  color: #006633 !important;
  text-decoration: underline;
}

.btn.radiobtn.btn-primary {
  background: #006633 !important;
}

.btn.radiobtn.btn-primary.active {
  background: #92BD1E !important;
}

.btn-group-vertical {
  width: 75%;
}