.rpao-private-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  color: #666;
  user-select: none;
}

.rpao-private-toggle .rpao-private-checkbox {
  margin: 0;
  /* Theme renders form inputs as full-width block, which stretches the
     checkbox and pushes the label far right. Pin it to intrinsic size so
     "Soukroma" sits right next to the checkbox. */
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  display: inline-block;
}

/* v0.3.1 — RPAO-UX-01 pattern: visually separate destructive action from attribute toggle
   Gestalt proximity: 3× gap ratio + vertical divider to prevent misclick
   (see report ux-ui-designer 2026-04-17, Option A) */
.existing-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.existing-attachment .rpao-private-toggle {
  margin-left: 24px;
  padding-right: 16px;
  border-right: 1px solid #d4d4d4;
}

.rpao-delete-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
  color: #a33;
  user-select: none;
}

.rpao-delete-toggle:hover {
  text-decoration: underline;
  cursor: pointer;
}

.rpao-delete-toggle .deleted_attachment {
  margin: 0;
}

.rpao-private-indicator {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%23a04040' d='M8 1a3 3 0 0 0-3 3v3H4a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1h-1V4a3 3 0 0 0-3-3zm-2 6V4a2 2 0 1 1 4 0v3H6z'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.85;
}

/* Clickable privacy toggle in the attachments list (before the trash icon).
   Two states use different icons AND colour: open padlock (unlock) is green,
   closed padlock (lock) is red. Hover swaps the visible icon to the opposite
   state, so the icon and its colour flip together. */
.rpao-private-toggle-link {
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
  color: #555;
  opacity: 0.85;
}
.rpao-private-toggle-link:hover { opacity: 1; }
.rpao-private-toggle-link svg.rpao-lock-open   { color: #2e7d32; } /* unlock -> green */
.rpao-private-toggle-link svg.rpao-lock-closed { color: #c62828; } /* lock   -> red   */
.rpao-private-toggle-link svg { width: 16px; height: 16px; vertical-align: middle; }
.rpao-private-toggle-link .rpao-lock-hover { display: none; }
.rpao-private-toggle-link:hover .rpao-lock-default { display: none; }
.rpao-private-toggle-link:hover .rpao-lock-hover { display: inline-block; line-height: 0; }

/* Inline placeholder shown instead of a private image in comments. */
img.rpao-private-inline { vertical-align: middle; }
