/* Floating chip on marketing/setup. Listing chrome embeds the panel in the ffs menu. */

.ffs-mkt #ffs-fis-sync-panel {
  top: 12px;
  right: 12px;
}

.ffs-chrome-drawer-note {
  margin: 0;
  font-size: 0.88em;
  opacity: 0.8;
  line-height: 1.4;
}

#ffs-fis-sync-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font: 13px/1.4 Arial, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  max-width: min(360px, 92vw);
  pointer-events: none;
}

#ffs-fis-storage-bar.ffs-fis-in-drawer #ffs-fis-sync-panel,
.ffs-chrome-drawer #ffs-fis-sync-panel {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  align-items: stretch;
  max-width: none;
  pointer-events: auto;
}

#ffs-fis-storage-bar.ffs-fis-in-drawer #fis-header,
.ffs-chrome-drawer #ffs-fis-storage-bar #fis-header {
  box-shadow: none;
  white-space: normal;
}

#ffs-fis-storage-bar.ffs-fis-in-drawer #fis-header-label,
.ffs-chrome-drawer #ffs-fis-storage-bar #fis-header-label {
  max-width: none;
}

#ffs-fis-storage-bar.ffs-fis-in-drawer #fis-body,
.ffs-chrome-drawer #ffs-fis-storage-bar #fis-body {
  width: 100%;
  max-height: min(36vh, 260px);
  overflow-x: hidden;
  overflow-y: auto;
}

#ffs-fis-storage-bar.ffs-fis-in-drawer #ffs-storage-ido-select,
.ffs-chrome-drawer #ffs-storage-ido-select {
  width: 100%;
  max-width: 100%;
}

#ffs-fis-sync-panel #fis-panel {
  position: static;
  width: 100%;
  pointer-events: none;
}

#ffs-fis-sync-panel #fis-header,
#ffs-fis-sync-panel #fis-panel.open #fis-body,
#ffs-fis-sync-panel #ffs-sync-row,
#ffs-fis-sync-panel #ffs-storage-row {
  pointer-events: auto;
}

#ffs-fis-sync-panel #fis-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(4, 218, 151, 0.12);
  border: 1px solid #04da97;
  border-radius: 22px;
  padding: 7px 16px 7px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

#ffs-fis-sync-panel #fis-header:hover {
  background: rgba(4, 218, 151, 0.22);
}

#ffs-fis-sync-panel #fis-header-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ffs-fis-sync-panel #fis-header-icon svg {
  width: 36px;
  height: 36px;
}

#ffs-fis-sync-panel #fis-header-label {
  font-size: 13px;
  color: #04da97;
  white-space: pre-line;
  line-height: 1.3;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ffs-fis-sync-panel #fis-header-arrow {
  font-size: 10px;
  color: #04da97;
  margin-left: 4px;
  transition: transform 0.25s;
}

#ffs-fis-sync-panel #fis-panel.open #fis-header-arrow {
  transform: rotate(180deg);
}

#ffs-fis-sync-panel #fis-body {
  display: none;
  margin-top: 6px;
  background: #0a0a1a;
  border: 1px solid #04da97;
  border-radius: 14px;
  padding: 16px;
  width: 320px;
  max-width: 100%;
  max-height: 80vh;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

#ffs-fis-sync-panel #components0.components,
#ffs-fis-sync-panel .components {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

#ffs-fis-sync-panel #fis-body .component,
#ffs-fis-sync-panel #fis-body .component_controls {
  max-width: 100%;
  box-sizing: border-box;
}

#ffs-fis-sync-panel #fis-body .component_controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

#ffs-fis-sync-panel #fis-panel.open #fis-body {
  display: block;
}

#ffs-fis-sync-panel #fis-body table {
  width: 100%;
  border-collapse: collapse;
}

#ffs-fis-sync-panel #fis-body td {
  background: #1a1a2e;
  padding: 10px;
  border-radius: 8px;
  vertical-align: top;
}

#ffs-fis-sync-panel #fis-body textarea {
  overflow: hidden;
  resize: vertical;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 4px 6px;
  line-height: 1.4;
  background: #111827;
  color: #e2e8f0;
  border: 1px solid #04da97;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  display: block;
  margin-bottom: 4px;
  box-sizing: border-box;
}

#ffs-fis-sync-panel #fis-body input[type="password"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 4px 6px;
  background: #111827;
  color: #e2e8f0;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  display: block;
  margin-bottom: 4px;
  box-sizing: border-box;
}

#ffs-fis-sync-panel #fis-body .add_text,
#ffs-fis-sync-panel #fis-body .add_password,
#ffs-fis-sync-panel #fis-body .add_image,
#ffs-fis-sync-panel #fis-body .add_clickset,
#ffs-fis-sync-panel #fis-body .add_charset,
#ffs-fis-sync-panel #fis-body .add_document {
  display: inline-block;
  margin: 2px 3px 2px 0;
  background: #1e2a3a;
  border: 1px solid #334;
  border-radius: 6px;
  padding: 3px 8px;
  color: #7a9cc0;
  font-size: 11px;
  cursor: pointer;
}

#ffs-fis-sync-panel #fis-body .add_text:hover,
#ffs-fis-sync-panel #fis-body .add_password:hover,
#ffs-fis-sync-panel #fis-body .add_image:hover,
#ffs-fis-sync-panel #fis-body .add_document:hover,
#ffs-fis-sync-panel #fis-body .add_charset:hover,
#ffs-fis-sync-panel #fis-body .add_clickset:hover {
  background: #04da97;
  color: #040218;
  border-color: #04da97;
}

#ffs-fis-sync-panel #identity_information {
  margin-top: 8px;
  font-size: 12px;
  color: #94a3b8;
}

#ffs-fis-sync-panel #fis-hint {
  margin-top: 12px;
  font-size: 11px;
  color: #64748b;
  text-align: right;
}

#ffs-sync-row {
  margin-top: 8px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

#ffs-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(4, 218, 151, 0.15);
  border: 1px solid #04da97;
  border-radius: 22px;
  padding: 8px 16px 8px 12px;
  color: #04da97;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, opacity 0.2s;
}

#ffs-sync-btn:hover:not(:disabled) {
  background: rgba(4, 218, 151, 0.28);
}

#ffs-sync-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#ffs-sync-btn .ffs-sync-tri {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 12px solid #04da97;
  flex-shrink: 0;
}

#ffs-sync-btn .ffs-sync-label {
  font-size: 13px;
}

#ffs-storage-row {
  margin-top: 6px;
  width: 100%;
  font-size: 11px;
  color: #cbd5e1;
  opacity: 0.85;
  text-align: right;
}

#ffs-storage-row label {
  color: #04da97;
  font-weight: 600;
  margin-right: 6px;
}

#ffs-storage-row select {
  background: #111827;
  color: #e2e8f0;
  border: 1px solid rgba(4, 218, 151, 0.35);
  border-radius: 6px;
  padding: 2px 6px;
  font: inherit;
  max-width: 12em;
}

#ffs-storage-meta {
  display: block;
  margin-top: 4px;
  opacity: 0.75;
}

@media (max-width: 640px) {
  #ffs-fis-sync-panel {
    top: 8px;
    right: 8px;
  }
  #ffs-fis-sync-panel #fis-body {
    width: calc(100vw - 16px);
  }
}
