/*
 * Modifications of bootstrap css for DiForPol Website
 * Copyright 2025 DiForPol-Team
 */

small,
.small {
  font-size: 80%;
  font-weight: 400;
}

.blockquote-footer {
  display: block;
  font-size: 80%;
  color: #6c757d;
}

/* change the color for code-tagged text */
code {
  font-size: 80%;
  color: #3ea4e8;
  word-wrap: break-word;
}

.valid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 80%;
  color: #28a745;
}

.was-validated .form-control:valid, .form-control.is-valid {
  border-color: #28a745;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .custom-select:valid, .custom-select.is-valid {
  border-color: #28a745;
  padding-right: calc(0.75em + 2.3125rem);
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right 0.75rem center/8px 10px no-repeat, #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) no-repeat;
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 80%;
  color: #dc3545;
}

.was-validated .form-control:invalid, .form-control.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .custom-select:invalid, .custom-select.is-invalid {
  border-color: #dc3545;
  padding-right: calc(0.75em + 2.3125rem);
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right 0.75rem center/8px 10px no-repeat, #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) no-repeat;
}

.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  -webkit-animation: .75s linear infinite spinner-border;
  animation: .75s linear infinite spinner-border;
}

.spinner-grow {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  background-color: currentColor;
  border-radius: 50%;
  opacity: 0;
  -webkit-animation: .75s linear infinite spinner-grow;
  animation: .75s linear infinite spinner-grow;
}

/* background on navbar */
.bg-dark {
  background-color: #0069b4 !important;
}

/* background for jumbotron */
.jumbotron-background {
  background-color: #e9ecef !important;
}

/* show the border on the bootom for display size lower than md */
@media (max-width:767px) {
  .img-container {
    background: #dee2e6;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-color: #d2d2d2;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* show the border on the right for display size md and up */
@media (min-width:768px) {
  .img-container {
    background: #dee2e6;
    border-right-style: solid;
    border-right-width: 1px;
    border-color: #d2d2d2;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* show the text centered */
.img-overlay-text-centered {
  text-align: center;
  flex: 0 0 88%;
}

/* show toast over modal */
.toast {
  z-index: 1056;
}

/* auto word wrapping in buttons */
.btn {
  hyphens: auto;
}

/* reduce horizontal padding for card headers */
.card-header {
  --bs-card-cap-padding-x: 0.75rem;
}

.nav-tabs {
  --bs-nav-tabs-border-color: #d2d2d2;
  --bs-nav-tabs-link-active-border-color: #d2d2d2 #d2d2d2 #f8f8f8;
}

.nav-tabs .nav-link.active {
  background-color: #f8f8f8 !important;
}

.div-tab {
  border-color: #d2d2d2 !important;
}

.div-tab-header {
  background: #f8f8f8;
}

/* change colors for accordion to fit with styles */
.accordion {
	--bs-accordion-border-color: #cccccc;
  --bs-accordion-btn-color: #212529;
	--bs-accordion-btn-bg: #f8f8f8;
	--bs-accordion-active-color: #4f5255;
	--bs-accordion-active-bg: #f8f8f8;
}

/* set padding for accordion header */
.accordion-button {
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* set padding for accordion content */
.accordion-body {
  padding: 16px;
}

/* calculate hight for the log div */
.div-log {
  height: calc(100vh - 4.5rem - 216px);
}

/* calculate hight for the logViewer div */
.div-logViewer {
  height: calc(100vh - 4.5rem - 216px);
  align-items: stretch;
}

/* set CodeMirror height and font size */
.CodeMirror {
  height: 100%;
  font-size: 80%;
  border-width: 1px;
  border-style: solid;
  border-color: #cccccc;
  border-top: none;
}