/* DoorForce Office Smart Sync — compact chip + panel (no permanent offline banner) */

.df-smart-sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(280px, 48vw);
  padding: 6px 10px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text-primary, #111827);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
}

.df-smart-sync-chip:focus-visible {
  outline: 2px solid var(--navy, #0a2342);
  outline-offset: 2px;
}

.df-smart-sync-chip .df-ss-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.25);
}

.df-smart-sync-chip .df-ss-dot[data-tone="synced"],
.df-smart-sync-chip[data-tone="synced"] .df-ss-dot {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.22);
}

.df-smart-sync-chip .df-ss-dot[data-tone="syncing"],
.df-smart-sync-chip[data-tone="syncing"] .df-ss-dot {
  background: #eab308;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.28);
}

.df-smart-sync-chip .df-ss-dot[data-tone="offline"],
.df-smart-sync-chip[data-tone="offline"] .df-ss-dot {
  background: #9ca3af;
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.28);
}

.df-smart-sync-chip .df-ss-dot[data-tone="problem"],
.df-smart-sync-chip[data-tone="problem"] .df-ss-dot {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.df-smart-sync-chip .df-ss-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.df-smart-sync-chip .df-ss-meta {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  white-space: nowrap;
}

/* Legacy banner permanently disabled */
.df-smart-sync-banner,
.df-offline-banner,
.df-connectivity-banner,
.offline-banner,
.sync-banner {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

.df-ss-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.df-ss-badge[data-state="pending"] { color: #92400e; }
.df-ss-badge[data-state="uploading"],
.df-ss-badge[data-state="syncing"] { color: #1d4ed8; }
.df-ss-badge[data-state="synced"] { color: #065f46; }
.df-ss-badge[data-state="failed"] { color: #991b1b; }

.df-smart-sync-panel {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 24px;
  background: rgba(15, 23, 42, 0.45);
}

.df-smart-sync-panel.is-open { display: flex; }

.df-smart-sync-card {
  width: min(480px, 100%);
  max-height: calc(100vh - 72px);
  overflow: auto;
  background: var(--surface, #fff);
  color: var(--text-primary, #111827);
  border-radius: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  padding: 18px 18px 14px;
}

.df-smart-sync-card h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--navy, #0a2342);
}

.df-smart-sync-card .df-ss-sub {
  margin: 0 0 14px;
  color: var(--text-muted, #6b7280);
  font-size: 13px;
}

.df-ss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.df-ss-grid div {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  padding: 10px;
}

.df-ss-grid span {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #6b7280);
  margin-bottom: 4px;
}

.df-ss-grid strong {
  font-size: 16px;
}

.df-ss-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.df-ss-warning {
  font-size: 12px;
  color: #92400e;
  margin: 0 0 8px;
  min-height: 0;
}

.df-ss-pending-list {
  border-top: 1px solid var(--border-color, #e5e7eb);
  padding-top: 10px;
  max-height: 220px;
  overflow: auto;
  font-size: 12px;
  margin: 0;
  padding-left: 0;
}

.df-ss-pending-list li {
  list-style: none;
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
}

.df-ss-close {
  float: right;
}

/* Temporary connectivity toasts */
.df-ss-toast-host {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 13000;
  width: min(420px, calc(100vw - 24px));
  pointer-events: none;
}

.df-ss-toast {
  pointer-events: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0a2342;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(6, 24, 47, 0.35);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.df-ss-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.df-ss-toast.tone-success { background: #065f46; }
.df-ss-toast.tone-info { background: #0a2342; }
.df-ss-toast.tone-danger { background: #991b1b; }

@media (max-width: 640px) {
  .df-ss-grid { grid-template-columns: 1fr; }
  .df-smart-sync-chip { max-width: 42vw; }
  .df-smart-sync-chip .df-ss-meta { display: none; }
}
