html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

#password-presets-modal .modal-dialog {
  max-width: 640px;
}

#password-presets-modal .modal-header,
#password-presets-modal .modal-footer {
  padding: 0.65rem 1rem;
}

#password-presets-modal .modal-body {
  padding: 0.75rem 1rem;
}

#password-presets-modal .mb-3 {
  margin-bottom: 0.75rem !important;
}

#password-presets-modal .form-label {
  margin-bottom: 0.25rem;
}

#password-presets-modal .flex-grow-1 {
  min-width: 0;
}

.reclamations-results-card {
  overflow: hidden;
}

.reclamations-table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.reclamations-table {
  min-width: 1500px;
}

.reclamations-scrollbar-top {
  overflow-x: auto;
  overflow-y: hidden;
  height: 18px;
  margin-bottom: 0.5rem;
}

.reclamations-scrollbar-spacer {
  height: 1px;
}

.reclamations-col-company {
    min-width: 160px;
    max-width: 160px;
}

.reclamations-col-serial {
    min-width: 135px;
    max-width: 135px;
}

.reclamations-col-sensor {
    min-width: 100px;
    max-width: 100px;
}

.reclamations-col-issue {
    min-width: 160px;
    max-width: 160px;
}

.reclamations-col-firstname {
    min-width: 95px;
    max-width: 95px;
}

.reclamations-col-lastname {
    min-width: 110px;
    max-width: 110px;
}

.reclamations-col-additional {
    min-width: 480px;
}

.reclamations-col-flag {
    min-width: 10px;
    max-width: 10px;
}

.reclamations-col-actions {
    min-width: 10px;
    white-space: nowrap;
}

.reclamation-flags-form {
    margin: 0;
}

    .reclamation-flags-form .btn {
        min-width: 10px;
    }

.helper-page {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}

.helper-tree {
  min-width: 0;
}

.helper-tree-container {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: auto;
  padding-right: 0.25rem;
  padding-left: 0.5rem;
}

@media (max-width: 992px) {
  .helper-page {
    grid-template-columns: 1fr;
  }
}

.helper-tree-root,
.helper-children {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.helper-tree-node + .helper-tree-node {
  margin-top: 0.35rem;
}

.helper-node-header {
  border-radius: 0.375rem;
  padding: 0.35rem 0.5rem;
  transition: background-color 0.15s ease;
  cursor: pointer;
  position: relative;
  gap: 0.5rem;
  padding-left: var(--helper-indent, 1.25rem);
}

.helper-node-header[data-has-children="true"]::before {
  content: '';
  position: absolute;
  left: calc(var(--helper-indent, 1.25rem) - 0.9rem);
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--bs-secondary);
  border-bottom: 2px solid var(--bs-secondary);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.15s ease;
}

.helper-node-collapsed > .helper-node-header[data-has-children="true"]::before {
  transform: translateY(-50%) rotate(-45deg);
}

.helper-node-header:hover {
  background-color: rgba(13, 110, 253, 0.08);
}

.helper-node-selected > .helper-node-header {
  background-color: rgba(13, 110, 253, 0.3);
}

.helper-node-other-owner > .helper-node-header {
  border-left: 3px solid #fd9843;
  background-color: rgba(253, 152, 67, 0.08);
}

.helper-children {
  margin-top: 0.35rem;
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px dashed #ced4da;
}

.helper-node-collapsed > .helper-children {
  display: none;
}

.helper-node-actions {
  display: none;
}

.helper-edit-mode .helper-node-actions {
  display: flex;
  gap: 0.25rem;
}

.helper-node-actions .btn {
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
}

.helper-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #212529;
  border: 1px solid transparent;
}

.helper-badge-shared {
  background-color: #e2e3e5;
  border-color: #d3d4d5;
}

.helper-badge-personal {
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.helper-badge-personal-other {
  background-color: #ffe8cc;
  border-color: #fdc48b;
  color: #7f4c05;
}

.helper-article-view {
  min-width: 0;
}

.helper-article-owner-note {
  margin-top: 0.25rem;
}

.helper-article-content {
  min-height: 240px;
  padding: 1.25rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.helper-article-text {
  white-space: pre-wrap;
}

.helper-toolbar .btn {
  white-space: nowrap;
}

.helper-admin-toggle {
  margin-bottom: 1rem;
}

.helper-article-section {
  position: relative;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.45rem 0.15rem 0.55rem 0.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.helper-article-section.helper-article-section-internal {
  background-color: #f8d7da;
  border-color: #f1aeb5;
}

.helper-article-section + .helper-article-section {
  margin-top: 0.75rem;
}

.helper-section-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.25rem;
  white-space: nowrap;
  padding: 0.3rem 0.6rem;
}

.helper-section-copy.helper-section-copy-internal {
  background-color: #f8d7da;
  border-color: #f1aeb5;
  color: #842029;
}

.helper-section-copy.helper-section-copy-internal:hover,
.helper-section-copy.helper-section-copy-internal:focus {
  background-color: #f1aeb5;
  border-color: #ea868f;
  color: #58151c;
}

.helper-section-copy.helper-section-copy-internal {
  background-color: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.4);
  color: #b02a37;
}

.helper-section-copy.helper-section-copy-internal:hover,
.helper-section-copy.helper-section-copy-internal:focus {
  background-color: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.6);
  color: #842029;
}

.helper-section-text {
  white-space: pre-wrap;
  word-break: break-word;
  padding-left: 0.4rem;
  padding-right: 3.25rem;
  min-height: 2.25em;
}

.helper-article-timestamps {
  margin-top: auto;
  padding-top: 0.75rem;
  text-align: right;
  color: #6c757d;
  font-size: 0.8rem;
  align-self: flex-end;
  width: 100%;
}

.helper-article-timestamps {
  margin-top: auto;
  padding-top: 0.75rem;
  text-align: right;
  color: #6c757d;
  font-size: 0.8rem;
  align-self: flex-end;
  width: 100%;
}

.article-section-input {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem 0.2rem;
  background-color: #f8f9fa;
}

.article-section-input.article-section-input-internal {
  background-color: #f8d7da;
  border-color: #f1aeb5;
}

.article-section-input.article-section-input-internal .article-section-textarea {
  background-color: #f8d7da;
  border-color: #f1aeb5;
}

.article-section-input.article-section-input-internal .article-section-textarea:focus {
  background-color: #f1aeb5;
  border-color: #ea868f;
}

#articleModal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

.article-sections-container {
  overflow: visible;
  padding-right: 0.5rem;
}

.article-section-actions .btn.article-section-move {
  padding: 0.25rem 0.5rem;
}

.article-section-textarea {
  min-height: 2.25em;
  line-height: 1.5;
  resize: vertical;
}

.article-section-remove.disabled {
  opacity: 0.5;
  pointer-events: none;
}
