.poster {
  position: relative;
}

.poster-content-boxes {
  display: flex;
  flex-direction: column;
  background-color: #1e1d22;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  padding: 12px;
  gap: 10px;
}

.poster-box-desc {
  display: none;
  resize: vertical;
  min-height: 60px;
  max-height: 400px;
  font-family: 'Roboto', sans-serif;
  font-size: inherit;
  line-height: 1.5;
  padding: 18px;
  padding-left: 20px;
}

.poster-box-title {
  font-weight: bold;
}

/* Attachments area */

.poster-attachments {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background-color: #1a191e;
  min-height: 80px;
}

.poster-attachment-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #19181b;
  cursor: grab;
  border: 2px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
}

.poster-attachment-thumb:hover {
  border-color: #5ad958;
}

.poster-attachment-thumb.dragging {
  opacity: 0.5;
}

.poster-attachment-thumb.uploading {
  opacity: 0.6;
}

.poster-attachment-thumb.error {
  border-color: #d95858;
}

.poster-attachment-thumb img,
.poster-attachment-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-attachment-thumb .video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  pointer-events: none;
}

.poster-attachment-thumb .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.poster-attachment-thumb:hover .remove-btn {
  opacity: 1;
}

.poster-attachment-thumb .remove-btn:hover {
  background-color: #d95858;
}

.poster-attachment-thumb .upload-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #5ad958;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Drop overlay */

.poster-drop-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(90, 217, 88, 0.15);
  border: 3px dashed #5ad958;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.poster-drop-overlay span {
  background-color: #5ad958;
  color: #19181b;
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 1rem;
}

/* Links area */

.poster-links {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background-color: #1a191e;
}

.poster-link-input-row {
  display: flex;
  gap: 8px;
}

.poster-link-input {
  flex: 1;
  background-color: #25232a;
  border: 1px solid #3a383f;
  border-radius: 5px;
  padding: 8px 12px;
  color: #f0f0f0;
  font-size: 0.9rem;
  font-family: 'Roboto', sans-serif;
}

.poster-link-input:focus {
  outline: none;
  border-color: #5ad958;
}

.poster-link-add {
  background-color: #5ad958;
  color: #19181b;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
}

.poster-link-add:hover {
  background-color: #6fe86d;
}

.poster-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.poster-link-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #312f38;
  padding: 4px 8px 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #8ab4f8;
}

.poster-link-chip .remove-link-btn {
  background: none;
  border: none;
  color: #f0f0f060;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
  line-height: 1;
}

.poster-link-chip .remove-link-btn:hover {
  color: #d95858;
}

/* Options bar */

.poster-options {
  display: flex;
  background-color: #25232A;
  padding: 0 12px 12px 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.poster-options.first {
  padding-top: 12px;
}

.poster-options.last {
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.poster-options-left,
.poster-options-right {
  display: flex;
}

.poster-vis-label {
  opacity: 0.6;
  font-size: 0.9rem;
}

.poster-option {
  display: flex;
  background-color: #19181B;
  border: none;
  width: 47px;
  height: 47px;
  cursor: pointer;
  align-items: center;
  text-align: center;
  justify-content: center;
  align-content: center;
}

/* Icon fill colors */
.poster-option-toggle-desc svg #page,
.poster-option-toggle-link svg .shape,
.poster-option-toggle-attach-image svg .shape,
.poster-option-toggle-attach-video svg .shape,
.poster-option-switch-private svg #padlock,
.poster-option-switch-public svg #eye {
  fill: #f0f0f0;
}

/* SVG img icons — tint via filter to match the fill color scheme */
/* .poster-option-toggle-attach-image img,
.poster-option-toggle-attach-video img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
  opacity: 0.94;
  transition: filter 0.15s, opacity 0.15s;
} */

/* .poster-option-toggle-attach-image.toggled img,
.poster-option-toggle-attach-video.toggled img {
  filter: brightness(0) saturate(100%) invert(74%) sepia(60%) saturate(400%) hue-rotate(70deg) brightness(105%);
  opacity: 1;
} */

.poster-option-toggle-desc {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

.poster-option-toggle-desc svg {
  width: 26px;
  height: 32px;
}

.poster-option-toggle-link svg {
  width: 14px;
  height: 32px;
}

.poster-option-toggle-attach-image svg {
  width: 31px;
  height: 32px;
}

.poster-option-toggle-attach-video {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

.poster-option-toggle-attach-video svg {
  width: 31px;
  height: 32px;
}

.poster-option-switch-private {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

.poster-option-switch-private svg {
  width: 16px;
  height: 24px;
}

.poster-option-switch-public {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

.poster-option-switch-public svg {
  width: 33px;
  height: 23px;
}

.poster-lbl-vis {
  color: #5ad958;
  font-weight: bold;
  align-self: center;
  margin: 0 8px 0 15px;
}

/* Toggled Poster Options */

.poster-option.toggled {
  background-color: #2f382f;
}

.poster-option-toggle-desc.toggled svg #page,
.poster-option-toggle-link.toggled svg .shape,
.poster-option-toggle-attach-image.toggled svg .shape,
.poster-option-toggle-attach-video.toggled svg .shape,
.poster-option-switch-private.toggled svg #padlock,
.poster-option-switch-public.toggled svg #eye {
  fill: #5ad958;
}

/* Post Button with Dropdown */

.poster-post-group {
  display: flex;
  margin-left: 12px;
  position: relative;
}

.poster-btn-post {
  background-color: #5ad958;
  color: #19181B;
  border: none;
  border-radius: 3px 0 0 3px;
  padding: 0 20px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  height: 47px;
}

.poster-btn-post:hover {
  background-color: #6fe86d;
}

.poster-btn-post:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.poster-btn-dropdown {
  background-color: #4fc94d;
  color: #19181B;
  border: none;
  border-left: 1px solid #3ab838;
  border-radius: 0 3px 3px 0;
  padding: 0 10px;
  font-size: 10px;
  cursor: pointer;
  height: 47px;
  display: flex;
  align-items: center;
}

.poster-btn-dropdown:hover {
  background-color: #5ad958;
}

.poster-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background-color: #25232a;
  border: 1px solid #3a383f;
  border-radius: 5px;
  overflow: hidden;
  z-index: 100;
  min-width: 140px;
}

.poster-dropdown-menu.visible {
  display: block;
}

.poster-dropdown-draft {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #f0f0f0;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.poster-dropdown-draft:hover {
  background-color: #312f38;
}