/* ========================================
   Task Details Popup - Consolidated Styles
   ======================================== */

/* ---------- Overlay ---------- */
.task_details_popup_overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Popup Container ---------- */
.task_details_popup_container {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: visible;
  animation: slideIn 0.3s ease;
  position: relative;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Custom scrollbar for popup */
.task_details_popup_container::-webkit-scrollbar {
  width: 8px;
}
.task_details_popup_container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}
.task_details_popup_container::-webkit-scrollbar-thumb {
  background: #9C27B0;
  border-radius: 4px;
}
.task_details_popup_container::-webkit-scrollbar-thumb:hover {
  background: #7B1FA2;
}

/* ---------- Header ---------- */
.task_details_popup_header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  z-index: 10;
}

/* ---------- Close Icon ---------- */
.task_details_close_icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
}
.task_details_close_icon:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

/* ---------- Title ---------- */
.task_details_title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 2rem 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.task_details_title_text {
  display: inline-flex;
  align-items: center;
}

.task_details_title_action_btn {
  border: none;
  background: transparent;
  color: #9C27B0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.task_details_title_action_btn:hover {
  background-color: rgba(156, 39, 176, 0.1);
  color: #7B1FA2;
}
.task_details_title_action_btn:focus {
  outline: 2px solid rgba(156, 39, 176, 0.4);
  outline-offset: 2px;
}

/* ---------- Info Table ---------- */
.task_details_info_container {
  border-collapse: collapse;
  margin: 2rem 2rem 1.5rem 0;
  font-size: 0.875rem;
  width: max-content;
  margin-left: auto;


}

.task_details_info_row {
  border-bottom: 1px solid #e5e7eb;
}
.task_details_info_row:last-child {
  border-bottom: none;
}

.task_details_info_label {
  font-weight: 600;
  color: #6b7280;
  padding: 0.75rem 0.1rem 0.75rem 0.5rem;
  white-space: nowrap;
  width: 1%;
  text-align: right;
}

.task_details_info_separator {
  width: 25px;
  min-width: 25px;
  max-width: 25px;
  padding: 0;
  vertical-align: middle;
  position: relative;
}
.task_details_info_separator::after {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background-color: #DDDDDD;
}

.task_details_info_value {
  color: #1f2937;
  padding: 0.75rem 0.4rem;
  vertical-align: middle;
  word-wrap: break-word;
}
.task_details_info_value a {
  color: #6366f1;
  text-decoration: none;
}
.task_details_info_value a:hover {
  text-decoration: underline;
}

/* ---------- Plain Info (outside table) ---------- */
.task_details_plain_info {
  margin: 1.5rem 2rem;
}

.task_details_plain_row {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 2px;
}

/* ---------- Description ---------- */
.task_details_description {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
}

/* ---------- Section Heading ---------- */
.task_details_section_heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.5rem 2rem 0rem 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

/* ---------- Notes Content ---------- */
.task_details_notes_content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #374151;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ---------- Subtasks Container ---------- */
.task_details_subtasks_container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: visible;
  padding-right: 8px;
  padding-top: 20px;
  margin-top: -10px;
}

.task_details_subtasks_container::-webkit-scrollbar {
  width: 6px;
}
.task_details_subtasks_container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}
.task_details_subtasks_container::-webkit-scrollbar-thumb {
  background: #9C27B0;
  border-radius: 3px;
}
.task_details_subtasks_container::-webkit-scrollbar-thumb:hover {
  background: #7B1FA2;
}

/* ---------- Floating Icons (job feed inside popup) ---------- */
.task_details_popup_container .job_feed_application .task_tracker_floating_icons {
  position: absolute;
  top: -15px;
  right: 10px;
  display: flex;
  gap: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 9999;
  pointer-events: auto;
}
.task_details_popup_container .job_feed_application:hover .task_tracker_floating_icons,
.task_details_popup_container .job_feed_application.mobile-tap .task_tracker_floating_icons {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  display: flex;
}

/* ---------- Photo Gallery in Details Popup ---------- */
.task_details_popup_container .social_feed_image_gallery_1 {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 15px;
  background: #282d3b;
  border-radius: 10px;
  overflow-x: auto;
  align-items: flex-start;
  scrollbar-width: thin;
  scrollbar-color: rgba(173, 118, 118, 0.5) transparent;
}
.task_details_popup_container .social_feed_image_gallery_1::-webkit-scrollbar {
  height: 6px;
}
.task_details_popup_container .social_feed_image_gallery_1::-webkit-scrollbar-track {
  background: transparent;
}
.task_details_popup_container .social_feed_image_gallery_1::-webkit-scrollbar-thumb {
  background-color: rgba(173, 118, 118, 0.5);
  border-radius: 3px;
}
.task_details_popup_container .social_feed_image_gallery_1::-webkit-scrollbar-thumb:hover {
  background-color: rgba(173, 118, 118, 0.8);
}
.task_details_popup_container .social_feed_image_gallery_1 > * {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.task_details_popup_container .social_feed_image_gallery_1 > *:hover {
  transform: scale(1.1) translateY(-10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}
.task_details_popup_container .social_feed_image_gallery_1 img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  margin: 0 !important;
}

/* ---------- Executor Dropdown ---------- */
.executor_dropdown_menu {
  position: fixed;
  z-index: 10000;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  padding: 4px 0;
  display: block;
  visibility: visible;
  opacity: 1;
}

.executor_dropdown_item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  font-size: 14px;
  background-color: transparent;
}
.executor_dropdown_item:last-child {
  border-bottom: none;
}
.executor_dropdown_item:hover {
  background-color: #f5f5f5;
  color: #007bff;
}
.executor_dropdown_item:active {
  background-color: #e9ecef;
}

/* ---------- Executor Name Clickable ---------- */
.executor-name-clickable {
  cursor: pointer;
  text-decoration: underline;
  color: #666666;
  transition: color 0.2s ease;
}
.executor-name-clickable:hover {
  color: #4f46e5 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .task_details_popup_overlay {
    align-items: flex-end;
  }

  .task_details_popup_container {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    padding: 16px 20px;
  }

  .task_details_popup_header {
    padding: 1rem 1.5rem;
  }


  .task_details_description,
  .task_details_notes_content {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .task_details_popup_header h3 {
    font-size: 1rem;
  }

  .task_details_close_icon {
    padding: 0.25rem;
  }

  .task_details_description,
  .task_details_notes_content {
    padding: 1rem;
  }
}

/* ========================================
   Pubview Card Overrides
   ======================================== */
.pubview-card-wrapper .pubview-description-container .task_details_section_heading {
  width: 100%;
  margin-top: 16px;
  margin-bottom: 8px;
}

.pubview-card-wrapper .pubview-description-container .task_details_subtasks_container {
  width: 100%;
  padding-top: 0;
  margin-top: 0;
  max-height: 400px;
}

.pubview-card-wrapper .pubview-description-container .task_details_subtasks_container > div[style*="padding: 8px 12px"] {
  width: 100%;
  box-sizing: border-box;
}
