html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn,
.btn:hover, .btn:focus, .btn:focus-visible, .btn:active, .btn:active:focus,
.btn-check:focus + .btn, .btn-check:checked + .btn, .btn.active, .btn.show,
.btn-link.nav-link:focus,
button:focus, button:focus-visible, button:active {
  box-shadow: none !important;
}

html {
  position: relative;
  min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/*----------------*/

:root {
  --primary-color: rgb(34, 112, 58);
  --primary-color-75: rgba(34, 112, 58, .75);
  --primary-color-25: rgba(34, 112, 58, .25);
  --primary-color-10: rgba(34, 112, 58, .1);
  --primary-color-05: rgba(34, 112, 58, .05);
  --primary-color-hover: rgb(89, 148, 107);

  --secondary-color: rgb(171, 208, 55);
  --secondary-color-70: rgba(171, 208, 55, .7);
  --secondary-color-30: rgba(171, 208, 55, .3);
  --secondary-color-25: rgba(171, 208, 55, .25);
  --secondary-color-20: rgba(171, 208, 55, .2);

  --color-disabled-10: rgba(0, 0, 0, .1);
  --color-disabled-15: rgba(0, 0, 0, .15);
}

body {
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

footer {
  background-color: var(--primary-color);
  background-image: linear-gradient(20deg, var(--secondary-color-70), var(--primary-color));
  color: white;
  text-align: center;
}

.sticky-top-padding {
  top: 70px;
}

.anchor-fragment {
  scroll-margin-top: 70px;
}

/* Custom Theme navigation */

.navbar-theme {
  background-color: var(--primary-color);
  background-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color-70));
  --bs-navbar-color: white;
  --bs-navbar-hover-color: white;
  --bs-navbar-active-color: var(--secondary-color);
  --bs-navbar-brand-color: white;
  --bs-navbar-brand-hover-color: var(--secondary-color);
}

.navbar-brand,
.nav-items-theme > li > .nav-link {
  border-bottom: 1px solid transparent !important;
}

a.navbar-brand:hover,
a.navbar-brand:focus,
.nav-items-theme > li > .nav-link:hover,
.nav-items-theme > li > .nav-link:focus {
  border-bottom: 1px solid white !important;
  color: white !important;
  box-shadow: none !important;
}

.navbar-brand.active,
.nav-items-theme > li > a.active {
  border-bottom: 1px solid var(--secondary-color) !important;
  color: var(--secondary-color) !important;
  font-weight: normal !important;
}

.navbar-toggler {
  border-color: transparent !important;
}

.navbar-toggler:hover,
.navbar-toggler-icon:hover {
  border-color: white !important;
  box-shadow: none !important;
}

.navbar-toggler:focus,
.navbar-toggler-icon:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: none !important;
}

.nav-dropdown-menu {
  background-color: transparent;
  background-image: none;
  border: none;
  padding: 0;
}

/* 1400px = xxl */
@media (min-width: 1400px) {
  .nav-dropdown-menu {
    background-color: var(--primary-color);
    background-image: linear-gradient(45deg, var(--primary-color-75), var(--secondary-color-30));
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* Custom Tabs */

.nav-tabs-theme {
  background-color: transparent !important;
  border: none !important;
}

.nav-tab-theme {
  margin: 3px !important;
}

.nav-tab-theme > button {
  background-color: var(--primary-color) !important;
  color: white !important;
  font-weight: 500 !important;
  border-radius: 2rem !important;
}

.nav-tab-theme > button.active {
  background-color: var(--secondary-color) !important;
  color: black !important;
}

.nav-tab-theme > button:focus {
  box-shadow: 0 0 0 0.15rem var(--secondary-color-25) !important;
}

/* Custom Theme Buttons */

.btn {
  width: 100%;
}

.btn-primary-theme {
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
  border-radius: 2rem;
}

.btn-radio-theme,
.btn-secondary-theme {
  color: var(--primary-color);
  font-weight: 500;
  border-radius: 2rem;
  border-color: var(--primary-color);
  border-width: 1px;
}

.btn-radio-theme {
  background-color: white;
}

.btn-secondary-theme {
  background-color: transparent;
}

.btn-secondary-theme:hover, .btn-secondary-theme:focus,
.btn-primary-theme:hover, .btn-primary-theme:focus {
  background-color: var(--primary-color-hover);
  color: white;
  font-weight: 500;
  border-radius: 2rem;
}

.btn-radio-theme:hover, .btn-radio-theme:focus {
  background-color: var(--primary-color-hover) !important;
  color: white !important;
  font-weight: 500 !important;
  border-color: var(--primary-color) !important;
}

.btn-check:checked + .btn-radio-theme {
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
  border-color: var(--primary-color);
}

.btn-danger-theme {
  background-color: white;
  color: red;
  font-weight: 500;
  border-radius: 2rem;
  border-color: red;
  border-width: 1px;
}

.btn-danger-theme:hover, .btn-danger-theme:focus {
  background-color: rgba(255, 0, 0, .75);
  color: white;
  font-weight: 500;
  border-radius: 2rem;
}

/* Custom Theme Input Group */

.group-input {
  width: auto;
  border-color: var(--primary-color);
  border-width: 1px;
}

.group-button {
  width: auto;
  padding-right: 20px;
  padding-left: 20px;
}

.group-button:hover, .group-button:focus {
  background-color: var(--primary-color-hover) !important;
  color: white !important;
  font-weight: 500 !important;
  border-color: var(--primary-color) !important;
}

.group-item-left {
  border-radius: 2rem 0 0 2rem !important;
}

.group-item-right {
  border-radius: 0 2rem 2rem 0;
}

/* Custom Theme Input */

.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--primary-color) !important;
  box-shadow: none !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.form-select:focus,
.form-control:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.25rem var(--primary-color-25) !important;
}

/* Custom Theme Checkbox */

.form-check-input {
  border-color: var(--primary-color);
}

.form-check-input:checked,
.form-check-input:indeterminate {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.form-check-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem var(--primary-color-25);
}

.check-for-textbox {
  margin-top: 11px;
}

/* Custom Border Container */

.border-container {
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  padding: 6px 12px;
}

.container-height {
  height: 210px !important;
  resize: none;
}

.container-min-height {
  min-height: 123px !important;
}

/* Custom Theme Select2 List Box */

.select2 {
  width: 100% !important;
}

.select2-results__option:hover,
.select2-results__option:focus {
  background-color: var(--primary-color-75) !important;
  color: white !important;
}

.select2-results__option--highlighted {
  background-color: transparent !important;
  color: var(--bs-body-color) !important;
}

.select2-results__option--selected {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.select2-dropdown {
  border-color: var(--primary-color) !important;
}

/* For multiple select2 list box hide the search box by default - this hides also placeholder! */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search {
  display: none !important;
}

/* Set the left padding for the search box in case the placeholder is visible. This will be combined with its container padding: 6px 0 0 6px  */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search {
  padding-left: 6px !important;
}

/* For multiple select2 input box make the padding smaller */
.select2-container--bootstrap-5 .select2-selection--multiple {
  padding: 6px 0 0 6px !important;
}

/* Custom Theme Alerts */

.alert-success-theme {
  --bs-alert-color: black;
  --bs-alert-bg: var(--secondary-color-25);
  --bs-alert-border-color: var(--secondary-color);
  --bs-alert-link-color: var(--bs-success-text-emphasis);
  margin: 0;
}

.alert-danger-theme {
  --bs-alert-color: rgb(226, 41, 34);
  --bs-alert-bg: var(--bs-danger-bg-subtle);
  --bs-alert-border-color: rgb(226, 41, 34);
  --bs-alert-link-color: var(--bs-danger-text-emphasis);
  font-weight: 500;
  margin: 0;
}

.z-alert {
  z-index: 1050;
}

.color-primary {
  color: var(--primary-color);
}

.btn-close-theme,
.btn-close-success {
  --bs-btn-close-focus-shadow: 0 0 0 0.25rem var(--primary-color-25) !important;
}

.btn-close-error {
  --bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(225, 0, 0, 0.25) !important;
}

/* Altering Razor validation message colors for @Html.ValidationMessageFor() method */

.field-validation-error {
  color: rgba(var(--bs-danger-rgb), 1);
}

/* Tables */

.w-5 {
  width: 5% !important;
}

.w-7 {
  width: 7% !important;
}

.w-10 {
  width: 10% !important;
}

.w-20 {
  width: 20% !important;
}

.w-30 {
  width: 30% !important;
}

.w-65 {
  width: 65%;
}

.table-light-theme {
  --bs-table-bg: var(--primary-color-10) !important;
  border-color: var(--primary-color) !important;
}

.cell-light-theme {
  --bs-table-bg: var(--primary-color-05);
}

.table-row-warning {
  --bs-table-bg: rgb(255, 197, 197) !important;
  border-color: rgba(255, 0, 0, .3) !important;
}

.table-row-up-vote > td {
  --bs-table-bg: var(--secondary-color-25) !important;
}

.table-row-up-vote > td.cell-light-theme {
  --bs-table-bg: var(--secondary-color-30) !important;
}

.table-row-down-vote {
  --bs-table-bg: var(--color-disabled-10) !important;
}

.table-row-down-vote > td.cell-light-theme {
  --bs-table-bg: var(--color-disabled-15) !important;
}

.center-cell-texts > th,
.center-cell-texts > td {
  text-align: center;
}

.background-warning {
  background-color: rgb(255, 207, 210) !important;
}

.bi-check2 {
  color: var(--secondary-color);
  font-size: 27px !important;
}

.bi-x {
  color: red;
  font-size: 27px !important;
}

td:has(> i.bi) {
  padding: 0 !important;
}

.bi-hand-thumbs-up-fill {
  color: var(--primary-color);
  font-size: 27px !important;
}

.bi-hand-thumbs-up {
  color: darkgray;
  font-size: 27px !important;
}

.bi-pencil-fill {
  color: var(--primary-color);
  font-size: 25px !important;
}

.bi-trash3-fill {
  color: red;
  font-size: 25px;
}

.smaller-icon {
  font-size: 20px !important;
}

.huge-icon {
  font-size: 60px !important;
}

/* Custom Grid */

.grid-header,
.grid-footer {
  background-color: var(--primary-color-10);
  border-bottom: var(--bs-border-width) var(--bs-border-style) var(--primary-color) !important;
}

.grid-header > div {
  font-weight: 700 !important;
  text-align: center !important;
}

.grid-footer > div {
  font-weight: 700 !important;
}

.grid-row {
  border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
}

.grid-row.disabled {
  background-color: var(--color-disabled-10) !important;
  border-bottom-color: var(--color-disabled-15) !important;
}

.grid-row-hoverable:hover,
.grid-row-hoverable:focus {
  background-color: rgba(var(--bs-emphasis-color-rgb), 0.075);
}

.grid-header > div,
.grid-footer > div,
.grid-row > div {
  align-content: center !important;
  padding: 0.5rem !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
}

.grid-header-cell {
  background-color: var(--primary-color-10);
  font-weight: 700 !important;
}

.grid-row.disabled > .grid-header-cell {
  background-color: var(--color-disabled-10) !important;
}

/* Text */

.text-primary-theme {
  color: var(--primary-color);
}

.text-primary-darker {
  color: rgb(24, 80, 39);
}

.text-warn {
  color: darkorange;
}

.text-gray {
  color: gray;
}

.fs-7 {
  font-size: 12px !important;
}

/* Images */

.w-max-200px {
  max-width: 200px !important;
}

/* Custom Card */

.card-container {
  padding: 1rem;
}

.card-container .card-theme {
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.card-container .card-theme:hover,
.card-container .card-theme:focus {
  transform: translateY(-5px);
  box-shadow: 0 1.25rem 2.25rem rgba(0, 0, 0, 0.22), 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}

.card-theme {
  border-width: 0;
  border-radius: 2rem;
  background-image: linear-gradient(20deg, var(--secondary-color-20), var(--primary-color-10));
  padding: 0 !important;
  box-shadow: var(--bs-box-shadow-lg) !important;
}

.card-img-wrapper {
  position: relative;
}

.card-img-crop {
  height: 200px;
  width: 100%;
  object-fit: cover;
  object-position: center;
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
  display: block;
}

.card-img-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: 600;
  font-size: 1.75rem;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.6); /* For text readability */
}

/* Progress */

.progress-theme {
  background-color: var(--secondary-color-20);
}

.progress-warn {
  background-color: rgba(255, 140, 0, 0.1);
}

.progress-danger {
  background-color: rgba(255, 0, 0, 0.1);
}

.progress-theme,
.progress-warn,
.progress-danger {
  font-weight: bold;
  height: 25px;
}

.progress-theme > .progress-bar {
  background-color: var(--secondary-color);
}

.progress-warn > .progress-bar {
  background-color: darkorange;
}

.progress-danger > .progress-bar {
  background-color: red;
}

.progress-theme > .progress-bar,
.progress-warn > .progress-bar,
.progress-danger > .progress-bar {
  padding: 5px !important;
  min-width: 30px;
}

/* Dialogs */

.dialog-theme {
  border-width: 0;
  border-radius: 2rem;
}

/* Voice Recording */

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.recording-icon {
  display: inline-block;
  transform-origin: center;
}

.recording-active .recording-icon {
  animation: pulse 1.5s infinite;
}