/* Shared base for all calculators */
body {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background-color: #201711;
  background-image: url("../../img_base/bg.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  color: #433120;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

p {
  font-weight: 500;
  margin: 0.5rem 0 0.5rem 0.5rem;
}

hr {
  width: 100%;
  border: 0;
  border-top: 2px solid white;
  opacity: 0.5;
  margin: 0;
  color: white;
}

h1 {
  flex: 0 0 auto;
  z-index: 50;
  width: calc(100% + 1.5rem);
  margin: 0 -0.75rem 8px;
  padding: 6px 10px;
  background: linear-gradient(100deg, rgba(50, 35, 25, 0.96), rgba(82, 54, 35, 0.92));
  border: 0;
  border-bottom: 1px solid rgba(215, 155, 66, 0.48);
  border-radius: 0;
  color: #f3c24a;
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: left;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.42);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

h1::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 11px 2px 4px;
  border: 2px solid #d79b42;
  transform: rotate(45deg);
}

h2 {
  font-size: 1.4rem;
}

.container {
  background-color: rgba(32, 23, 17, 0.66);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin-top: 0 !important;
  overflow: hidden;
  border-inline: 1px solid rgba(215, 155, 66, 0.24);
  box-shadow:
    inset 12px 0 18px -18px rgba(215, 155, 66, 0.42),
    inset -12px 0 18px -18px rgba(215, 155, 66, 0.42);
}

.calculator-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: flex-start;
  scrollbar-width: thin;
  scrollbar-color: #9a6a45 #332318;
}

.row {
  --bs-gutter-x: 0rem;
}

.collapse-header {
  color: #f3c24a;
  font-weight: bolder;
  background-color: rgba(79, 54, 37, 0.86);
  border-radius: 10px 10px 0 0;
  padding: 10px;
  margin: 0;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  margin: 0;
  text-transform: uppercase;
}

.results .result-label::after {
  content: ":";
}

.calculator-bonuses-form .form-group {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.calculator-bonuses-form label {
  margin-bottom: 4px;
}

.calculator-bonuses-form .form-group > .form-control,
.calculator-bonuses-form .form-group > .form-select,
.calculator-bonuses-form .form-group > .brewery-production-control-input {
  margin-top: auto;
}

.collapse-area {
  background-color: rgba(79, 54, 37, 0.86);
  border-radius: 10px;
  overflow: hidden;
}

.collapse {
  padding-bottom: 10px;
}

.result .collapse {
  padding-bottom: 0;
}

.results {
  color: white;
  font-weight: bolder;
  font-size: large;
}

.form-control,
.form-select,
.form-select option {
  width: 100%;
  font-weight: bold;
  padding: 8px;
  font-size: 15px;
  background-color: #f3e0c2;
  color: #3e2a16;
  border: 2px solid #bd9a79;
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(243, 194, 74, 0.5);
  border-color: #f3c24a;
  outline: none;
  background-color: #f3e0c2;
}

.form-group {
  color: white;
  font-size: 16px;
  font-weight: bolder;
}

label {
  color: #ffffff;
  font-size: 16px;
}

.calculator-bonuses-form .form-group {
  padding-left: 5px;
  padding-right: 5px;
}

/* Keep calculator surfaces readable while allowing the page background to show through slightly. */
.calculator-bonuses-form,
.calculator-bonuses-form .form-group,
.results {
  background: rgba(96, 65, 44, 0.94) !important;
}

.result .calculator-bonuses-form {
  background: transparent !important;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #9a6a45 #332318;
}

::-webkit-scrollbar {
  width: 10px;
  background-color: transparent;
}

::-webkit-scrollbar-track {
  background-color: #332318;
}

::-webkit-scrollbar-thumb {
  background-color: #9a6a45;
  border: 2px solid #332318;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #be8b56;
}

::-webkit-scrollbar-thumb:active {
  background-color: #d79b42;
}

.home-icon-link {
  position: fixed;
  right: 10px !important;
  bottom: 20px !important;
  top: auto !important;
  left: auto !important;
  transform: none;
  width: 50px;
  height: 50px;
  z-index: 1000;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.home-icon-link:hover {
  transform: none;
}

.home-icon {
  background-color: rgba(96, 65, 44, 0.62);
  border: 1px solid rgba(243, 194, 74, 0.78);
  border-radius: 8px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 10px rgba(0, 0, 0, 0.38);
}

.home-icon-link:hover .home-icon {
  background-color: rgba(113, 76, 49, 0.6);
  border-color: rgba(243, 194, 74, 0.75);
}

.home-icon i {
  color: #f3c24a;
}

@media only screen and (max-width: 1399.98px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
}

@media only screen and (max-width: 700px) {
  body {
    margin: 0 !important;
    background-attachment: scroll;
  }

  .container {
    border-inline: 0;
  }

  h1 {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 5px;
    padding: 6px 8px;
    font-size: 1.1rem;
  }

  h1::before {
    width: 7px;
    height: 7px;
    margin-right: 8px;
  }
}
