/* === Compact Text Publisher Modal === */
#modal.show .modal-dialog {
  max-width: 650px !important;
  width: 60% !important;
  margin: 1.5rem auto !important;
}



/* === Publisher Box === */
#publisher-text-wrapper {
  position: relative;
  padding: 0;
}

#publisher-text-wrapper .x-form.publisher {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  min-height: 250px;
  max-width: 500px;
  margin: auto;
}

#publisher-text-wrapper .publisher-overlay {
  display: none; /* No background overlay needed */
}

/* === Text Area === */
#publisher-text-wrapper .publisher-message textarea {

    background-color: #d3d4d5;
    border-radius: 10px;
}

/* === Footer (Post Button) === */
#publisher-text-wrapper .publisher-footer {
  text-align: right;
  margin-top: 40px;
}

#publisher-text-wrapper .publisher-footer .btn {
  border-radius: 8px;
  padding: 6px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  height:35px !important;
  width:100px !important;
}

/* === Avatar === */
#publisher-text-wrapper .publisher-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  left: 0px !important;
}

/* === Responsive === */
@media (max-width: 767px) {
  #modal.show .modal-dialog {
    width: 90% !important;
    margin: 1rem auto !important;
  }
  #publisher-text-wrapper .x-form.publisher {
    padding: 15px;
    min-height: auto;
  }
  #publisher-text-wrapper .publisher-footer .btn {
    padding: 6px 16px;
  }
   #publisher-text-box {
        height: auto !important;
        min-height: 0 !important;
    }
}
.colored-text-wrapper {
  position: relative;
}




.publisher-emoji-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  cursor: pointer;
}

.publisher-textarea-wrap {
  position: relative;
}





.publisher-textarea-wrap {
  position: relative;
}

/* right side icon group */
.publisher-inside-tools {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
}

/* force icon size */
.inside-tool-icon {
  width: 22px !important;
  height: 22px !important;
  cursor: pointer;
  opacity: 0.9;
}

.inside-tool-icon:hover {
  transform: scale(1.15);
}

/* make room inside textarea */
.publisher-textarea-wrap textarea {
  padding-right: 190px !important;
}

.publisher-message {
  padding-left: 0 !important;
}

.publisher-message textarea
 {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 10px 10px 10px 12px !important;
    box-sizing: border-box;
}
.publisher textarea:not(.form-control) {
      font-size: 14px !important;  
          text-align: justify !important;
    text-justify: inter-word; 
}

.publisher-body {
  margin-left: 0 !important;
}
.publisher-header .publisher-username {
    margin-left: 60px;
    line-height: 1;
    font-weight: 600;
}
.publisher-message {
  padding-left: 0 !important;
}

/* Increase publisher header height */
.publisher-header {
  min-height: 48px;         
  padding: 8px 0;            /* vertical space */
  display: flex;
  align-items: center;
  gap: 10px;
}
.publisher-title {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  padding: 8px 0;
  border-bottom: 3px solid #e4e6eb;
  
}

  .publisher-tagged-people {
  margin: 8px 0;
}
.publisher-tag-textarea {
  margin-top: 8px;
}





.tag-people-icon {
  width: 30px !important;
  height: 30px !important;
}
/* 🔵 Main post textarea (keep as-is) */
#publisher-text-wrapper .publisher-textarea-wrap textarea {
  background-color: #d3d4d5;
}

/* 🟢 Tag-people textarea (override main rule) */
#publisher-text-wrapper .publisher-tag-textarea textarea {
  background-color: #f0f2f5 !important;
  border: 1px dashed #c7ccd1;
  border-radius: 10px;
  min-height: 44px !important;
}
/* ===== Publisher textarea wrapper ===== */
.publisher-textarea-wrap {
  position: relative;
}

/* ===== Right-side tool icons ===== */
.publisher-inside-tools {
  position: static;          /* 🔑 remove absolute positioning */
  margin-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===== Tool icons ===== */
.publisher-inside-tools .inside-tool-icon {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.publisher-inside-tools .inside-tool-icon:hover {
  transform: scale(1.15);
}

/* ===== Textarea (THIS is the key) ===== */
.publisher-textarea-wrap textarea {
  width: 100%;
  min-height: 50px;
  padding: 10px 170px 10px 12px; /* 🔑 right padding = icon space */
  box-sizing: border-box;
  background-color: #d3d4d5;
  border-radius: 10px;
}
/* Transparent textarea ONLY in colored mode */
.publisher.colored-active 
.publisher-textarea-wrap textarea {
overflow-y: auto !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
      min-height: 180px !important;
      padding-left: 29px !important;
    padding-right: 30px !important;
}
.publisher-message.colored .publisher-textarea-wrap {
  min-height: 180px;
  max-height: 280px;
}

.publisher-message.colored textarea {
  min-height: auto !important;
    overflow-y: auto !important;
  padding-bottom: 60px;
  padding-right: 80px;
}
/* Show avatar in colored posts */
.publisher-message.colored .publisher-avatar {
  display: inline-block !important;
}

/* Align properly */
.publisher-message.colored .publisher-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.publisher-message.colored .publisher-avatar {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  display: inline-block !important;
  border: 2px solid #fff;
}

.publisher-message.colored .publisher-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px 6px;
}

.publisher-message.colored .publisher-username {
  color: #fff;
  font-weight: 600;
}
/* Username spacing fix — colored posts only */
.publisher.colored-active 
.publisher-header 
.publisher-username {

  margin-left: 0 !important;
}
.publisher.colored-active textarea {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;           /* text visible on dark bg */
  text-align: center;               /* optional like Facebook */
  font-size: 26px;                 /* optional FB style */
  font-weight: 600;
}

/* Placeholder color */
.publisher.colored-active textarea::placeholder {
  color: rgba(255,255,255,0.7) !important;
}


.publisher-message {
  position: relative;
}
/* Poll privacy button styling */
#poll_privacy {
  width: auto !important;
  min-width: 180px;
  max-width: 240px;
  display: inline-block;
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 500;
  font-size: 14px;
}
.publisher.colored-active .publisher-textarea-wrap textarea::-webkit-scrollbar {
    width: 8px;
}

.publisher.colored-active .publisher-textarea-wrap textarea::-webkit-scrollbar-track {
    background: transparent;
}

.publisher.colored-active .publisher-textarea-wrap textarea::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);   /* subtle transparent */
    border-radius: 20px;
}

.publisher.colored-active .publisher-textarea-wrap textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.22);
}
.poll-add-btn{
    margin-top:10px;
    cursor:pointer;
    color:#1877f2;
    font-weight:600;
    font-size:14px;
    user-select:none;
}

.poll-add-btn:hover{
    opacity:.8;
}
/* =====================================
   POLL POPUP NIGHT MODE
===================================== */
html.night-mode #pollPopup,
body.night-mode #pollPopup,
[data-theme="dark"] #pollPopup {

    background: #494e51 !important;
    color: #fff !important;
    border: 1px solid #5a6064 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

/* heading + all text */
html.night-mode #pollPopup *,
body.night-mode #pollPopup *,
[data-theme="dark"] #pollPopup * {
    color: #fff !important;
}

/* close button */
html.night-mode #pollPopup .custom-close,
body.night-mode #pollPopup .custom-close,
[data-theme="dark"] #pollPopup .custom-close {
    color: #fff !important;
    opacity: 1 !important;
}

/* poll inputs */
html.night-mode #pollPopup input,
body.night-mode #pollPopup input,
[data-theme="dark"] #pollPopup input {

    background: #3f4447 !important;
    color: #fff !important;
    border: 1px solid #666 !important;
}

/* placeholder */
html.night-mode #pollPopup input::placeholder,
body.night-mode #pollPopup input::placeholder,
[data-theme="dark"] #pollPopup input::placeholder {
    color: #d5d5d5 !important;
}

/* footer border */
html.night-mode #pollPopup .modal-footer,
body.night-mode #pollPopup .modal-footer,
[data-theme="dark"] #pollPopup .modal-footer {
    border-top: 1px solid #5a6064 !important;
}

/* =====================================
   NIGHT MODE - POLL PREVIEW INSIDE PUBLISHER
===================================== */

html.night-mode .publisher-poll-preview,
body.night-mode .publisher-poll-preview,
[data-theme="dark"] .publisher-poll-preview {
    background: transparent !important;
    color: #fff !important;
}

/* Question text */
html.night-mode .poll-question-preview,
body.night-mode .poll-question-preview,
[data-theme="dark"] .poll-question-preview {
    color: #fff !important;
}

/* Poll options */
html.night-mode .poll-option-preview,
body.night-mode .poll-option-preview,
[data-theme="dark"] .poll-option-preview {
    background: #494e51 !important;
    color: #fff !important;
    border: 1px solid #63686c !important;
    box-shadow: none !important;
}

/* icons inside options */
html.night-mode .poll-option-preview i,
body.night-mode .poll-option-preview i,
[data-theme="dark"] .poll-option-preview i,
html.night-mode .poll-option-preview svg,
body.night-mode .poll-option-preview svg,
[data-theme="dark"] .poll-option-preview svg {
    color: #fff !important;
    fill: #fff !important;
}

/* Hover */
html.night-mode .poll-option-preview:hover,
body.night-mode .poll-option-preview:hover,
[data-theme="dark"] .poll-option-preview:hover {
    background: #555b5e !important;
}
/* =====================================
   NIGHT MODE FIX - POLL PREVIEW TEXT
===================================== */

/* force all text inside option rows white */
html.night-mode .poll-option-preview,
html.night-mode .poll-option-preview *,
body.night-mode .poll-option-preview,
body.night-mode .poll-option-preview *,
[data-theme="dark"] .poll-option-preview,
[data-theme="dark"] .poll-option-preview * {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* if option text is inside span/div/p */
html.night-mode .poll-option-preview span,
html.night-mode .poll-option-preview div,
html.night-mode .poll-option-preview p,
body.night-mode .poll-option-preview span,
body.night-mode .poll-option-preview div,
body.night-mode .poll-option-preview p,
[data-theme="dark"] .poll-option-preview span,
[data-theme="dark"] .poll-option-preview div,
[data-theme="dark"] .poll-option-preview p {
    color: #ffffff !important;
}

/* placeholder safeguard if input exists */
html.night-mode .poll-option-preview input,
body.night-mode .poll-option-preview input,
[data-theme="dark"] .poll-option-preview input {
    color: #ffffff !important;
}