/* =========================
   BOARD LAYOUT
   ========================= */

.hidden {
  display: none !important;
}

.board_main_header {
  padding: 64px 96px;
  padding-bottom: 40px;
}

.board_main {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.input_wrapper_direction {
  display: flex;
  flex-direction: row;
  gap: 32px;
  width: 520px;
}

.input_icon_border_left {
  border-left: 1px solid rgba(209, 209, 209, 1);
  justify-content: end;
  display: flex;
  align-items: center;
  width: 48px;
}

.main_header_gap_mobile {
  width: 100%;
}

.main_drag_and_drop {
  display: flex;
  flex-direction: row;
  gap: 32px;
  overflow-y: auto;
  max-height: calc(100vh - 288px);
  padding: 0 96px;
}

.drag_content_gap {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  gap: 24px;
}

.drag_area_header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.drag_area {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 10px;
  gap: 16px;
}

/* =========================
   EMPTY STATE
   ========================= */

.no_task_text {
  text-align: center;
  font-size: 14px;
  background-color: #f6f7f8;
  border: 1px dashed #d1d1d1;
  border-radius: 10px;
  color: #a8a8a8;
  padding: 16px;
}

/* =========================
   TASK CARD
   ========================= */

.task {
  display: flex;
  flex-direction: column;
  align-items: start;
  width: 100%;
  height: 200px;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 24px;
  padding: 16px;

  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);

}

.task_category {
  font-size: 16px;
  font-weight: 400;
  color: white;
  border-radius: 8px;
  border: none;
  background-color: rgba(0, 56, 255, 1);
  padding: 4px 16px;
}

/* NEUER WRAPPER */
.task_bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* LINKE SEITE */
.task_left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* RECHTE SEITE (ICON SPALTE) */
.task_right {
  display: flex;
  align-items: center;
  /* 🔥 vertikal mittig */
  justify-content: center;
  width: 24px;
}

/* ICON */
.task_right img {
  width: 18px;
  height: 18px;
}

/* PROGRESS TEXT */
.task_progress_wrapper p {
  margin: 6px 0 0 0;
  font-size: 12px;
}


/* CATEGORY */

.task_category {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  padding: 4px 16px;
  border-radius: 8px;

  font-size: 16px;
  font-weight: 500;
  color: white;
}

.task_category.user {
  background: #0038ff;
}

.task_category.technical {
  background: #1fd7c1;
}

/* TITLE */

.task_title {
  font-size: 16px;
  font-weight: 700;
  color: #2a3647;
  margin-bottom: 6px;
}

/* DESCRIPTION */

.task_description {
  font-size: 14px;
  color: #a8a8a8;
  margin-bottom: 6px;
}

/* PROGRESS */

.task_progress_wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* 🔥 DAS ist der Fix */
  gap: 8px;
}

.task_progress_wrapper p {
  margin: 0;
  /* ❗ wichtig */
  font-size: 12px;
  line-height: 1;
  /* ❗ verhindert "Absacken" */
  display: flex;
  align-items: center;
}

.progressbar {
  width: 60%;
  height: 6px;
  background: #e0e0e0;
  /* <- DAS ist der sichtbare Grundbalken */
  border-radius: 10px;
  overflow: hidden;
}


.progressbar_fill {
  height: 100%;
  background: #4589ff;
  border-radius: 10px;
}



/* FOOTER */

.task_footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* AVATARS */

.avatar_group {
  display: flex;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 11px;
  font-weight: 600;
  margin-left: -8px;
}

.avatar:first-child {
  margin-left: 0;
}


/* PRIORITY ICON */

.priority_icon {
  display: flex;
  align-items: center;
  /* 🔥 wichtig */
  height: 100%;
  /* optional */
}

.priority_icon img {
  width: 18px;
  height: 18px;
  display: block;
  /* ❗ verhindert baseline shift */
}

/* =========================
   OVERLAY (DETAIL VIEW)
   ========================= */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);

  display: flex;
  justify-content: center;
  align-items: center;
}

.task_overlay {
  background: white;
  width: 500px;
  border-radius: 30px;
  padding: 32px;

  display: flex;
  flex-direction: column;
  gap: 16px;
  /* 🔥 */
}

.overlay_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overlay_header button {
  padding: 0;
  justify-content: center;
  align-items: center;

}

.task_overlay h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}

.task_overlay p {
  font-size: 16px;
}

.task_priority_overlay {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* =========================
   EDIT OVERLAY
   ========================= */

.edit_overlay {
  background: white;
  border-radius: 30px;
  width: min(90%, 520px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.08);
}

.scroll-area {
  overflow-y: auto;
  padding: 24px;
}

/* INPUTS */

.input_style {
  width: 100%;
  border: 1px solid #d1d1d1;
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
}

.input_style:focus {
  border-color: #29abe2;
  outline: none;
}

/* PRIORITY BUTTONS */

.priority_buttons {
  display: flex;
  gap: 10px;
}

.priority_buttons button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
}

#taskForm button.active[data-priority="urgent"] {
  background: #ff3d00;
  color: white;
}

#taskForm button.active[data-priority="medium"] {
  background: #ffa800;
  color: white;
}

#taskForm button.active[data-priority="low"] {
  background: #7ae229;
  color: white;
}

/* DROPDOWN */

.dropdown_menu {
  margin-top: 6px;
  border-radius: 10px;
  background: white;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
}

/* ACTION BUTTON */

.edit_actions {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0;
}

.edit_actions button {
  background: #2a3647;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
}

.edit_actions button:hover {
  background: #29ABE2;
}

/* RED STAR */
.red_star {
  color: red;
}

.avatar_row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.subtask_item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  border-radius: 6px;
}

.subtask_actions {
  display: none;
  gap: 8px;
}

.subtask_item:hover .subtask_actions {
  display: flex;
}

.subtask_actions img {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ADD TASK DIALOG */
.addTask_dialog_content {
  border-radius: 30px;
  border: none;
  top: 50%;
  left: 50%;
  padding: 0;
  overflow: hidden;
  transform: translate(-50%, -50%) translateX(500px);
  transition: all 125ms ease-in;
}

.addTask_dialog_direction {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.addTask_dialog_content.dialog_opend {
  transform: translate(-50%, -50%) translateX(0);
  transition: all 125ms ease-in;
}

.addTask_dialog_content::backdrop {
  background-color: rgb(184, 185, 186);
  opacity: 0;
  transition: all 125ms ease-in;
}

.addTask_dialog_content.dialog_opend::backdrop {
  opacity: 0.3;
}

.addTask_dialog_content.dialog_closed {
  transform: translate(-50%, -50%) translateX(500px);
  transition: all 125ms ease-in;
}

.addTask_dialog_content.dialog_closed::backdrop {
  opacity: 0;
}

.main_addTask_dialog_header {
  display: flex;
  align-items: start;
  padding: 48px 48px;
  padding-bottom: 16px;
}

.addTask_dialog_content #addTaskContainer #taskForm {
  padding: 0 48px 24px;
}

.addTask_dialog_content .requiredNotice {
  margin-top: 56px;
}

.addTask_dialog_content .form_buttons {
  margin-top: 32px;
}

.taskForm_dialog {
  display: flex;
  height: 100%;
  gap: 24px;
  padding: 0 48px;
  padding-bottom: 24px;
}

@media(min-width: 1160px) and (max-width:1250px) {
  .main_drag_and_drop {
    padding: 0 48px;
  }

  .addTask_dialog_content {
    width: 800px;
  }

  .board_main_header {
    padding: 64px 48px;
    padding-bottom: 40px;
  }

}

@media(min-width: 1116px) and (max-width:1159px) {
  .addTask_dialog_content {
    width: 800px;
  }

  .main_drag_and_drop {
    padding: 0 16px;
  }

  .board_main_header {
    padding: 40px 16px;
    padding-bottom: 16px;
  }
}

@media(min-width: 320px) and (max-width:1115px) {

  .board_main {
    height: auto;
  }

  .board_main_header {
    padding: 24px 16px;
  }

  .main_header_gap_mobile {
    gap: 40px;
    padding-bottom: 16px;
  }

  .input_wrapper_direction {
    width: 100%;
  }

  .main_drag_and_drop {
    overflow-y: initial;
    max-height: initial;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 48px;
  }

  .drag_area {
    overflow-x: scroll;
    max-width: 100%;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    margin-bottom: 0;
  }

  .drag_area::-webkit-scrollbar {
    display: none;
  }

  .drag_content_gap {
    width: 100%;
  }

  .task {
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.3);
  }

}