/* Loading Bar */
#loading-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background-color: var(--progressBar-bg-color);
  visibility: hidden;
  transition: visibility 0s linear 0.5s;
}

#loading-bar.visible {
  visibility: visible;
  transition-delay: 0s;
}

#loading-bar .progress {
  position: absolute;
  inset: 0;
  background-color: #005f6a;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.3s;
}

#loading-bar .progress.indeterminate {
  background-color: #005f6a;
  transform: none;
  animation: loading-bar-indeterminate 2s linear infinite;
}

@keyframes loading-bar-indeterminate {
  0% {
    transform: translateX(-142px);
  }
  100% {
    transform: translateX(0);
  }
}

#loading-bar .glimmer {
  display: none;
}

/* Error Wrapper */
#error-wrapper {
  background-color: var(--error-color);
  color: white;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#error-wrapper[hidden] {
  display: none;
}

#error-message-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

#error-message-right {
  display: flex;
  align-items: center;
}

#error-show-more,
#error-show-less,
#error-close {
  background-color: var(--toggled-btn-bg-color);
  border: none;
  color: white;
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
}

#error-more-info {
  margin-top: 8px;
  width: 100%;
  background-color: var(--toggled-btn-bg-color);
  color: white;
  border: none;
  padding: 8px;
  font-family: monospace;
  font-size: 11px;
}

.clear-both {
  clear: both;
}

/* Overlay Container */
#overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#overlay-container.hide {
  display: none;
}

#overlay-container .container {
  background-color: var(--doorhanger-bg-color);
  border: 1px solid var(--doorhanger-border-color);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
}

#overlay-container .container.hide {
  display: none;
}

#overlay-container .dialog {
  padding: 16px;
}

#overlay-container .row {
  margin-bottom: 12px;
}

#overlay-container .row:last-child {
  margin-bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#overlay-container label {
  display: block;
  margin-bottom: 4px;
  color: var(--main-color);
}

#overlay-container input[type="password"] {
  width: 100%;
}

.overlay-button {
  background-color: #005f6a;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.15s;
}

.overlay-button:hover {
  background-color: #004f57;
}

#password-cancel,
#document-properties-close {
  background-color: transparent;
  border: 1px solid var(--separator-color);
}

#password-cancel:hover,
#document-properties-close:hover {
  background-color: var(--button-hover-color);
}

/* Document Properties */
#document-properties-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--main-color);
}

#document-properties-table tr {
  border-bottom: 1px solid var(--separator-color);
}

#document-properties-table td {
  padding: 8px 4px;
}

#document-properties-table td:first-child {
  font-weight: 600;
  width: 40%;
  color: var(--field-border-color);
}

#document-properties-table td:last-child {
  word-break: break-all;
}

/* Print Service Overlay */
#print-service-overlay progress {
  width: 100%;
  height: 20px;
  margin-bottom: 8px;
}

#print-service-overlay .relative-progress {
  display: block;
  text-align: center;
  margin-bottom: 12px;
}

.button-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* Utility Classes */
.hidden {
  display: none !important;
}
