/* Overlay only. Does not hide or restyle the Angular app. */

.samipe-desk-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.samipe-desk-tools--fixed {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2147483646;
  margin-right: 0;
}

.samipe-desk-tools button {
  pointer-events: auto;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #1a5276;
  color: #fff;
  font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.samipe-desk-tools button:hover,
.samipe-desk-tools button:focus-visible {
  background: #2471a3;
}

.samipe-desk-tools button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.samipe-desk-tools button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.samipe-desk-tools__sync {
  background: #196f3d;
}

.samipe-desk-tools__sync:hover,
.samipe-desk-tools__sync:focus-visible {
  background: #1e8449;
}

body:not(.dark-mode) .samipe-desk-tools--fixed button {
  border-color: rgba(0, 0, 0, 0.12);
}

.samipe-desk-toasts {
  position: fixed;
  top: 56px;
  right: 12px;
  z-index: 2147483646;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.samipe-desk-toast {
  pointer-events: auto;
  box-sizing: border-box;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 8px;
  background: #1e1e1e;
  color: #fff;
  font: 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.samipe-desk-toast[popover] {
  inset: unset;
  margin: 0;
  border: 0;
  position: static;
}

.samipe-desk-toast:is(:popover-open, .\:popover-open) {
  display: flex;
}

.samipe-desk-toast--ok {
  background: #145a32;
}

.samipe-desk-toast--err {
  background: #7b241c;
}

.samipe-desk-toast__msg {
  flex: 1;
}

.samipe-desk-toast__close {
  pointer-events: auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .samipe-desk-toast {
    transition: opacity 0.2s ease, display 0.2s allow-discrete, overlay 0.2s allow-discrete;
  }

  @starting-style {
    .samipe-desk-toast:is(:popover-open, .\:popover-open) {
      opacity: 0;
    }
  }
}

.samipe-desk-toast + .samipe-desk-toast {
  margin-top: 0;
}

app-comments td.samipe-has-visit,
app-comments td.samipe-has-visit span[style*="nowrap"] {
  white-space: normal !important;
}

app-comments td .samipe-visit {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #0b3d5c;
  background: #e8f1f8;
  border: 1px solid #c5d7e6;
  border-radius: 4px;
  padding: 3px 7px;
  white-space: normal !important;
  max-width: 320px;
}

#samipe-pedidos-page {
  padding-bottom: 2rem;
}

#samipe-pedidos-page .section-header {
  margin-bottom: 1rem;
}

#samipe-pedidos-page label {
  font-size: 0.85rem;
  color: #495057;
}

#samipe-pedidos-page td {
  vertical-align: middle;
}

#samipe-pedidos-page td span {
  margin-left: 0.6rem;
}

.samipe-pedidos-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  background: #dee2e6;
}

.samipe-pedidos-photo--empty {
  display: inline-block;
}

.samipe-pedidos-refs {
  max-height: calc(100vh - 260px);
  overflow: auto;
}

.samipe-pedidos-refs .list-group-item.active small {
  color: rgba(255, 255, 255, 0.8) !important;
}
