html {
  font-size: 14px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.required-indicator {
  color: #dc3545;
  font-weight: 600;
  margin-left: 0.25rem;
}

.required-helper {
  color: #6b7280;
  font-size: 0.85rem;
}

@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: 0;
  background-color: #f7f9fc;
  color: #1f2933;
}

.layout-main {
  padding: 2rem 1.5rem;
}

@media (min-width: 992px) {
  .layout-main {
    padding: 3rem 2rem;
  }
}

@media (min-width: 1400px) {
  .layout-main {
    padding: 3rem 4rem;
  }
}

@media (min-width: 1920px) {
  .layout-main {
    padding: 4rem 6rem;
  }
}

@media (max-width: 768px) {
  .layout-main {
    align-items: flex-start !important;
    padding: 1.5rem 1rem;
  }
}

.content-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 1920px) {
  .content-wrapper {
    max-width: 1600px;
  }
}

@media (min-width: 2560px) {
  .content-wrapper {
    max-width: 1920px;
  }
}

.modern-header .navbar-nav .nav-link.btn {
  border-radius: 999px;
}

.cookie-consent-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.35);
  pointer-events: none;
  z-index: 1080;
}

.cookie-consent-backdrop[hidden] {
  display: none !important;
}

.cookie-consent-panel {
  width: min(640px, 100%);
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  padding: 1.75rem;
  pointer-events: auto;
}

.cookie-consent-header,
.cookie-consent-body {
  margin-bottom: 1.5rem;
}

.cookie-consent-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
}

.cookie-consent-option:first-of-type {
  border-top: none;
}

.cookie-consent-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

@media (max-width: 576px) {
  .cookie-consent-panel {
    padding: 1.25rem;
  }

  .cookie-consent-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

.cookie-consent-footer .btn {
  width: 100%;
}
}

button.is-loading {
  cursor: wait;
}

.btn-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

button.is-loading .btn-label {
  opacity: 0.85;
}

.recaptcha-error {
  margin-bottom: 1rem;
}

.btn-spinner {
  display: inline-flex;
  align-items: center;
}

.scan-form .input-group-text {
  font-size: 1.25rem;
  background-color: #ffffff;
  border-right: 0;
}

.scan-form .input-group .form-control-lg {
  font-size: 1rem;
  border-left: 0;
}

.export-options {
  background-color: #f8fbff;
  border-color: rgba(37, 140, 251, 0.25);
}

.scan-history-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  background-color: #ffffff;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scan-history-actions .btn.disabled,
.scan-history-actions .btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.65;
}

@media (max-width: 576px) {
  .scan-history-actions .btn {
    flex: 1 1 100%;
  }
}

.profile-controls {
  flex-wrap: nowrap;
}

@media (max-width: 767.98px) {
  .profile-controls {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .profile-controls .nav-link {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #a11yWidgetWrapper {
    display: none !important;
  }

  .profile-controls .d-flex {
    gap: 0.5rem;
  }
}

/* Accessibility styles */

body.grayscale {
    filter: grayscale(100%);
}

body.high-contrast {
    background-color: #000;
    color: #fff;
}

body.high-contrast a {
    color: #ffff00;
}

body.negative-contrast {
    filter: invert(100%);
}

/* Oversize file highlight - used by doc Upload page */
.file-chip.oversize {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220,53,69,.15);
    animation: pulseRed 1.6s ease-in-out 1;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(220,53,69,.35);
    }

    100% {
        box-shadow: 0 0 0 12px rgba(220,53,69,0);
    }
}
