html {
  background: #927558 url(wood-background.jpg) no-repeat center center fixed;
  background-size: cover;
  text-align: center;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-family: "Sarala", sans-serif;
}

/* Styling for fieldsets in both form and results */
.accent-bar {
  margin: 0px auto;
  background: rgba(73, 138, 214, 0.7);
  width: 100%;
  max-width: 450px;
  padding: 20px 0 10px;
}

#small-filler.accent-bar {
  padding: 15px 0 0;
}

#pm-tag {
  padding: 20px !important;
  color: #555459;
}

#pm-tag img {
  width: 38%;
  min-width: 180px;
  float: left;
  margin-right: 10px;
}

#pm-tag #text {
  text-align: right;
  float: right;
}

#pm-tag a {
  color: #F1592A;
}

#form-title {
  padding: 40px 10px 10px;
  color: white;
  font-weight: bold;
  font-size: xx-large;
}

#filler {
  flex-grow: 1;
}

#feedback-button {
  position: fixed;
  bottom: 50px;
  right: -40px;
  padding-top: 8px;
  z-index: 1002;
  transform: rotate(270deg);
}

fieldset {
  padding: 5px 10px;
  text-align: left;
}

.side-label {
  width: 5em;
}

.centered {
  text-align: center;
}

.ui-slider {
  margin-bottom: 20px;
}

.ui-slider-range {
  background: rgba(73, 138, 214, 1);
}

.ui-slider .ui-slider-handle {
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
}

.ui-slider-horizontal .ui-slider-handle {
  top: -0.4em;
  margin-left: -0.7em;
}

.ui-datepicker {
  z-index: 3 !important;
}

input, .input-group {
  margin-bottom: 25px;
}

.nav-buttons .btn {
  height: 40px;
  font-size: medium;
  font-weight: bold;
}

.nav-buttons a:hover {
  cursor: pointer;
}

#results .nav-buttons a.collapsed::after {
  content: "Make adjustments to your numbers";
}

#results .nav-buttons a:not(.collapsed)::after {
  content: "Collapse";
}

.supp-buttons {
  border: 2px solid;
  color: #498AD6;
  border-color: #498AD6;
}

.supp-buttons:hover {
  color: #498AD6;
}

.supp-buttons.active {
  background-color: #498AD6;
  color: white;
}

.form-control, .input-group-btn .dropdown-toggle {
  height: 40px;
}

.input-group-btn .dropdown-toggle {
  background-color: #eeeeee;
}

.dropdown-menu input[type=radio] {
  visibility: hidden;
}

.dropdown-menu li>label {
  width: 100%;
}

input.touched:invalid:not(:focus) {
  border-color: #de4242;
}

label:not(.btn,.goal-label)::after {
  content: ':';
}

@media (max-width: 500px) {
  select {
    display: block;
    margin-bottom: 10px;
  }
}

@media (min-width: 400px) {
  #ranch-form .label-description {
    float: right;
  }
}

@media (max-width: 400px) {
  #ranch-form .label-description {
    display: block;
    margin-bottom: 5px;
  }
}

@media (min-width: 800px) {
  #adjust-params .label-description {
    float: right;
  }
}

@media (max-width: 800px) {
  #adjust-params .label-description {
    display: block;
    margin-bottom: 5px;
  }
}

.two-part {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.half {
  flex-grow: 1;
  width: 0;
}

.separator {
  padding-bottom: 25px;
  margin: 10px;
}

@media (max-width: 400px) {
  #ranch-form .half, #results .half {
    width: 100%;
  }

  #ranch-form .separator, #results .separator {
    display: none;
  }

  #ranch-form .nav-buttons .btn {
    margin-bottom: 10px;
  }
}

@media (min-width: 700px) and (max-width: 800px) {
  #results .half {
    width: 100%;
  }

  #results .separator {
    display: none;
  }
}

.toggle {
  width: 100%;
  margin-bottom: 10px;
}

.toggle label {
  width: 50%;
}

.tooltip-desc {
  text-decoration: underline;
}

#supp-details {
  margin-top: 0.4em;
}

#graze-vs-supp {
  margin-bottom: 0.5em;
}

/* Styling of form page */
#ranch-form, #pm-tag {
  width: 100%;
  max-width: 500px;
  padding: 10px;
  margin: 0 auto;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 4px 0 rgba(0,0,0,0.50);
}

#ranch-form fieldset {
  margin-bottom: 0px;
}

#ranch-form fieldset:not(:first-of-type) {
  display:none;
}

#ranch-form .in-results {
  display: none;
}

.nav-buttons, .btn-group {
  margin: 10px 0;
  text-align: center;
}

.nav-buttons .btn.next:disabled, .nav-buttons .btn.submit:disabled {
  background: #bbb;
  border: none;
}

.nav-buttons .btn.next, .nav-buttons .btn.submit, .nav-buttons .btn.pm-apply {
  background: rgba(73, 138, 214, 1);
  border: none;
}

.nav-buttons .btn.prev, .nav-buttons .btn.pm-skip {
  background: white;
  color: rgba(73, 138, 214, 1);
  border-width: 2px;
  border-color: rgba(73, 138, 214, 1);
}

.form-prompt {
  text-align: center;
  font-size: large;
  margin-bottom: 10px;
  font-weight: bold;
}

.form-description {
  font-size: medium;
}

#progressbar {
  list-style: none;
  margin: 0;
  padding: 0;
}

#progressbar li {
  display: inline-block;
}

#progressbar button {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #d8d8d8;
  margin: 10px;
  box-shadow: inset 0 1px 1px 0 rgba(0,0,0,0.25);
  border: 0;
}

#progressbar button.active {
  background: rgba(73, 138, 214, 1);
}

/* Styling of modals */
.modal:not(.no-img) .modal-header {
  background-image: url(modal-background.jpeg);
  background-size: cover;
  border-radius: 5px 5px 0 0;
  height: 120px;
  color: white;
  position: relative;
}

.modal:not(.no-img) .modal-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  font-size: xx-large;
}

.modal.no-img .modal-header {
  border-bottom: 0;
}

#lead-form {
  margin: 20px;
  text-align: left;
}

.dialog-tip {
  position: absolute;
  width: calc(100% + 100px);
  max-width: 400px;
  background: white;
  z-index: 101;
  top: calc(100% + 35px);
  padding: 15px;
  color: black;
  border: 5px solid #498AD6;
  border-radius: 8px;
}

.dialog-tip-triangle {
  position: absolute;
  top: calc(100% + 20px);
  right: calc(50% - 20px);
  width: 0;
  height: 0;
  z-index: 101;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 20px solid #498AD6;
}

#results .dialog-tip .nav-buttons {
  margin: 20px auto 0;
  width: 100%;
}

#results .dialog-tip .half {
  width: 0;
}

#results .dialog-tip .separator {
  display: block;
}

#pm-end-modal .modal-header {
  height: 100px;
  text-align: center;
}

#pm-end-modal .modal-title {
  color: #F1592A;
  font-size: xx-large;
  font-weight: bold;
  margin: 10px auto 0;
}

#pm-end-modal .separator {
  padding-bottom: 0;
  font-size: x-large;
  color: green;
}

#pm-end-modal .field-change-summary div.pm-value {
  font-size: large;
}

#change-summary-list .two-part {
  width: 80%;
  min-width: 250px;
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}

#pm-end-modal .before {
  background-color: #e0e0e0;
}

#pm-end-modal .after {
  background-color: #d5efd5;
}

#pm-end-modal #change-summary-list > .two-part:first-of-type > div {
  padding-top: 10px;
}

#pm-end-modal #change-summary-list > .two-part > div {
  padding-bottom: 20px;
}

@media (min-width: 490px) {
  .profit-change {
    font-size: xx-large;
  }
}

@media (max-width: 490px) {
  .profit-change {
    font-size: x-large;
  }
}

#pm-end-modal .change-summary > div.half {
  position: relative;
}

#pm-end-modal .triangle-right {
  position: absolute;
  border-bottom: 10px solid transparent;
  border-top: 10px solid transparent;
  border-left: 10px solid;
  top: calc(50% - 10px);
  width: 0;
  height: 0;
}

#pm-end-modal .before > .triangle-right {
  border-left-color: #e0e0e0;
  right: -10px;
}

#pm-end-modal .after > .triangle-right {
  border-left-color: white;
}

#pm-end-modal .before .change-indicator {
  visibility: hidden;
}

#pm-end-modal .modal-footer {
  text-align: center;
  border: 0;
}

#pm-end-modal .modal-footer a {
  margin: 0 auto;
}

#pm-end-modal .modal-footer a:hover {
  cursor: pointer;
}

.change-indicator {
  font-size: small;
  color: green;
}

#change-summary-list {
  margin-bottom: 20px;
}

.pm-name {
  color: #F1592A;
}

#contact-sales-rep {
  width: 80%;
  min-width: 250px;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
}

#contact-info .btn{
  width: 100%;
  font-weight: bold;
}

#sales-rep-img {
  width: 20%;
  min-width: 60px;
  float: right;
  margin-top: 15px;
  margin-bottom: 10px;
  margin-left: 10px;
  border-radius: 50%;
  shape-outside: circle();
}

/* Styling of results page */
#results {
  background: white;
  padding: 10px;
  margin: 0 auto;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 4px 0 rgba(0,0,0,0.50);
}

#results .in-form {
  display: none;
}

#results .btn-primary {
  background-color: #498AD6;
  border: none;
}

@media (min-width: 700px) {
  #results {
    max-width: 1000px;
  }

  #adjust-params {
    display: flex;
  }

  #results .flex-half {
    width: 50%;
  }
}

@media (max-width: 700px) {
  #results {
    max-width: 500px;
  }
}

#results .form-header {
  font-size: large;
  background-color: gray;
  color: white;
  border-radius: 6px 6px 0 0;
  padding: 5px 5px 10px;
  text-align: center;
}

#results .form-container {
  border: solid silver;
  border-width: 0 1px 1px;
  padding: 10px;
  border-radius: 0 0 6px 6px;
}

/* inputs have a margin-bottom of 25px, so the parent having a margin-bottom
 of -15px means that the form container would have a margin-bottom of 10px */
#results .form-container > div:nth-last-child(2):not(.input-group) {
  margin-bottom: -15px;
}

#results .form-container > div:nth-last-child(2).input-group {
  margin-bottom: 10px;
}

#results fieldset:last-child {
  margin-bottom: 0;
}

#current-results {
  font-size: medium;
}

#not-profit-related > div, #cost-breakdown > div {
  background: lightgray;
  color: #444;
}

#profit-related {
  color: white;
}

@media (max-width: 500px) {
  #profit-breakdown {
    margin-bottom: 20px;
  }

  #not-profit-related {
    display: flex;
    justify-content: space-around;
  }

  #not-profit-related > div {
    flex-grow: 1;
    padding: 6px 0;
  }

  #not-profit-related > div:first-child {
    border-radius: 6px 0 0;
    margin-right: 1px;
  }

  #not-profit-related > div:last-child {
    border-radius: 0 6px 0 0;
  }

  #not-profit-related > div > div {
    flex-grow: 1;
  }

  #profit-related {
    color: white;
    border-radius: 0 0 6px 6px;
  }
}

@media (min-width: 500px) {
  #profit-breakdown {
    max-width: 600px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: space-between;
    text-align: left;
  }

  #profit-breakdown > div {
    flex-direction: column;
  }

  #profit-breakdown > div > div {
    flex-grow: 1;
    padding: 10px 0 10px 20px;
  }

  #not-profit-related {
    flex-grow: 1;
  }

  #not-profit-related > div:first-of-type {
    border-radius: 6px 0 0;
    margin-bottom: 1px;
  }

  #not-profit-related > div:last-of-type {
    border-radius: 0 0 0 6px;
  }

  #profit-related {
    border-radius: 0 6px 6px 0;
    width: 60%;
  }
}

#profit-breakdown .result-label,.result-descriptor {
  text-transform: uppercase;
}

#profit-breakdown .result-label {
  font-size: small;
}

#profit-breakdown .result-descriptor {
  font-size: medium;
}

#profit-breakdown .result-content {
  font-size: large;
}

#profit-breakdown #curr-profit {
  font-size: xx-large;
}

.breakdown-toggle {
  border: 0;
  border-radius: 6px;
  background-color: rgb(173, 173, 173);
}

.breakdown-toggle.collapsed::after {
  content: '+';
}

.breakdown-toggle:not(.collapsed)::after {
  content: '-';
}

#cost-breakdown {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}

#cost-breakdown > div {
  padding: 5px;
  width: 10em;
  margin: 1px;
}

#pm-profit-label {
  font-weight: bold;
  color: #555459;
}

#pm-profit-start {
  white-space: normal;
  padding: 6px 25px;
  margin-left: 20px;
  font-weight: bold;
}

#pm-profit-change {
  color: #47b71c;
  font-size: 1.2em;
}

#current-results .positive {
  background-color: green;
}

#current-results .negative {
  background-color: red;
}

#current-results, #adjust-params {
  margin: 10px;
}
