.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.modal-overlay.open {
  display: flex;
}

.add-task-modal {
  background: #fff;
  width: 1000px;
  max-width: calc(100% - 40px);
  max-height: 90vh;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  padding: 32px 36px;
  position: relative;
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.add-task-modal .modal-header {
  position: relative;
  margin-bottom: 32px;
  padding-right: 36px;
}

.add-task-modal .modal-header h2 {
  margin: 0;
  font-size: 48px;
  line-height: 1;
  font-weight: 800;
  color: #111;
}

.add-task-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #24303a;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.add-task-modal .modal-close:hover {
  background: rgba(0, 0, 0, 0.04);
}

.add-task-modal form#addTaskForm {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}

.add-task-modal .add-task-container {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 8px;
}

.add-task-modal .left-content {
  flex: 1 1 50%;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.add-task-modal .left-content input:focus{
  border-color:#29abe2;
  outline:none;
}

.add-task-modal .left-content textarea:focus{
  border-color:#29abe2;
  outline:none;
}

.add-task-modal .right-content {
  flex: 1 1 50%;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.add-task-modal .seperator-content {
  width: 0;
  height: 424px;
  border-left: 1px solid #d1d1d1;
  margin: 0 16px;
  align-self: flex-start;
}

.add-task-modal .title-section,
.add-task-modal .description-section,
.add-task-modal .due-date-section,
.add-task-modal .priority-section,
.add-task-modal .assigned-section,
.add-task-modal .category-section,
.add-task-modal .subtasks-section {
  display: flex;
  flex-direction: column;
}

.add-task-modal .title-section label,
.add-task-modal .description-section span,
.add-task-modal .due-date-section label,
.add-task-modal .priority-section span,
.add-task-modal .assigned-section label,
.add-task-modal .category-section label,
.add-task-modal .subtasks-section label {
  display: block;
  margin-bottom: 8px;
  color: #24303a;
  font-weight: 400;
  font-size: 16px;
}

.add-task-modal .required-star {
  color: #ff8190;
}

.add-task-modal input[type="text"],
.add-task-modal input[type="date"],
.add-task-modal textarea,
.add-task-modal select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #d1d1d1;
  background: #fff;
  color: #2a3647;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  outline: none;
}

.add-task-modal .dropdown-header .dropdown-search,
.add-task-modal input[type="text"].dropdown-search {
  width: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  height: auto;
}

.add-task-modal input[type="text"]::placeholder,
.add-task-modal textarea::placeholder {
  color: #d1d1d1;
}

.add-task-modal input:focus,
.add-task-modal textarea:focus,
.add-task-modal select:focus {
  border-color: #2a3647;
}

.add-task-modal textarea {
  min-height: 100px;
  resize: vertical;
}

.add-task-modal .priority-buttons-container {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
}

.add-task-modal .priority-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  min-width: 120px;
  border-radius: 10px;
  border: 1px solid #d1d1d1;
  background: #fff;
  cursor: pointer;
  font-weight: 400;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  transition: all 0.125s ease;
}

.add-task-modal .priority-btn:hover {
  border-color: #2a3647;
}

.add-task-modal .priority-btn.active {
  background: #ffa800;
  color: #fff;
  border-color: #ffa800;
}

.add-task-modal .priority-btn.active img {
  filter: brightness(0) invert(1);
}

.add-task-modal .prio-icon {
  width: 20px;
  height: 14px;
  object-fit: contain;
}

.add-task-modal .modal-footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 12px;
}

.add-task-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.add-task-modal .required-note {
  color: #d9534f;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #2a3647;
  color: #2a3647;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 500;
  transition: all 0.125s ease;
}

.btn-cancel:hover {
  background: #dbdbdb;
}

.btn-cancel svg {
  width: 14px;
  height: 14px;
}

.btn-create-task {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 10px;
  background: #2a3647;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 21px;
  font-weight: 700;
  transition: all 0.125s ease;
}

.btn-create-task:hover {
  background: #091931;
}

.btn-create-task:disabled {
  background-color: #a0a0a0;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-create-task svg {
  width: 16px;
  height: 12px;
}

.add-task-modal .custom-dropdown {
  position: relative;
  width: 100%;
}

.add-task-modal .dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #d1d1d1;
  background-color: #fff;
  cursor: pointer;
  padding: 0 12px 0 16px;
}

.add-task-modal .dropdown-header:focus-within {
  border-color: #29abe2;
}

.add-task-modal .dropdown-search {
  flex: 1;
  border: none;
  outline: none;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  background: transparent;
}

.add-task-modal .dropdown-search::placeholder {
  color: #d1d1d1;
}

.add-task-modal .dropdown-arrow {
  width: 24px;
  height: 24px;
  transition: transform 0.125s ease;
}

.add-task-modal .dropdown-arrow.open {
  transform: rotate(180deg);
}

.add-task-modal .dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: max-height 0.125s ease;
}

.add-task-modal .dropdown-list.open {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #d1d1d1;
  border-top: none;
}

.add-task-modal .dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.125s ease;
}

.add-task-modal .dropdown-item:hover {
  background-color: #f0f0f0;
}

.add-task-modal .dropdown-item.no-hover:hover {
  background-color: transparent;
  cursor: default;
}

.add-task-modal .dropdown-item.selected {
  background-color: #2a3647;
  color: #fff;
}

.add-task-modal .dropdown-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.add-task-modal .dropdown-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

.add-task-modal .dropdown-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #2a3647;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.add-task-modal .dropdown-item.selected .dropdown-checkbox {
  background: #2a3647;
  border-color: #fff;
}

.add-task-modal .dropdown-checkbox img {
  width: 12px;
  height: 12px;
  filter: brightness(0) invert(1);
  display: none;
}

.add-task-modal .dropdown-item.selected .dropdown-checkbox img {
  display: block;
}

.add-task-modal .selected-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.add-task-modal .selected-contacts.hidden {
  display: none;
}

.add-task-modal .contact-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

.add-task-modal #modalCategoryDropdown {
  position: relative;
  width: 100%;
}

.add-task-modal #modalCategoryDropdown .dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #d1d1d1;
  background-color: #fff;
  cursor: pointer;
  padding: 0 12px 0 16px;
}

.add-task-modal #modalCategoryDropdown .dropdown-header:hover {
  border-color: #29abe2;
}

.add-task-modal .dropdown-selected-text {
  flex: 1;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #d1d1d1;
  display: flex;
  align-items: center;
  line-height: 48px;
  margin-bottom: 0;
}

.add-task-modal .dropdown-selected-text.has-value {
  color: #2a3647;
}

.add-task-modal #modalCategoryDropdown .dropdown-arrow {
  width: 24px;
  height: 24px;
  transition: transform 0.125s ease;
}

.add-task-modal #modalCategoryDropdown .dropdown-arrow.open {
  transform: rotate(180deg);
}

.add-task-modal #modalCategoryList {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: max-height 0.125s ease;
}

.add-task-modal #modalCategoryList.open {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #d1d1d1;
  border-top: none;
}

.add-task-modal #modalCategoryList .dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.125s ease;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #2a3647;
}

.add-task-modal #modalCategoryList .dropdown-item span {
  margin-bottom: 0;
}

.add-task-modal #modalCategoryList .dropdown-item:hover {
  background-color: #f0f0f0;
}

.add-task-modal #modalCategoryList .dropdown-item.selected {
  background-color: #f0f0f0;
}

.add-task-modal .subtasks-section {
  display: flex;
  flex-direction: column;
}

.add-task-modal .subtask-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.add-task-modal .subtask-input-wrapper .subtask-input {
  flex: 1;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #d1d1d1;
  font-family: "Inter", sans-serif;
  padding-left: 16px;
  padding-right: 80px;
  font-size: 16px;
  margin-bottom: 0;
}

.add-task-modal .subtask-input-wrapper .subtask-input:focus {
  border-color: #29abe2;
  outline: none;
}

.add-task-modal .subtask-actions {
  position: absolute;
  right: 12px;
  display: none;
  align-items: center;
  gap: 4px;
}

.subtask-list{
  height: 65px;
  overflow-y:scroll;
}

.subtask-list::-webkit-scrollbar {
  display: none;
}

.add-task-modal .subtask-actions.visible {
  display: flex;
}

.add-task-modal .subtask-action-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.125s ease;
}

.add-task-modal .subtask-action-icon:hover {
  opacity: 1;
}

.add-task-modal .subtask-action-divider {
  width: 1px;
  height: 24px;
  background-color: #d1d1d1;
  margin: 0 4px;
}

.add-task-modal .subtask-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.add-task-modal .subtask-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.125s ease;
  margin-left: 0;
}

.add-task-modal .subtask-item:hover {
  background-color: #f0f0f0;
}

.add-task-modal .subtask-item::before {
  content: "•";
  font-size: 18px;
  color: #2a3647;
}

.add-task-modal .subtask-item-text {
  flex: 1;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #2a3647;
  margin-bottom: 0;
}

.add-task-modal .subtask-item-actions {
  display: none;
  align-items: center;
  gap: 4px;
}

.add-task-modal .subtask-item:hover .subtask-item-actions {
  display: flex;
}

.add-task-modal .subtask-item-actions .subtask-edit-icon,
.add-task-modal .subtask-delete-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.125s ease;
}

.add-task-modal .subtask-item-actions .subtask-edit-icon:hover,
.add-task-modal .subtask-delete-icon:hover {
  opacity: 1;
}

.add-task-modal .subtask-edit-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 4px 0;
}

.add-task-modal .subtask-edit-input {
  flex: 1;
  height: 36px;
  border: none;
  border-bottom: 1px solid #29abe2;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  padding: 0 8px;
  background: transparent;
  outline: none;
}

.add-task-modal .subtask-edit-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.add-task-modal .subtask-edit-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.125s ease;
}

.add-task-modal .subtask-edit-icon:hover {
  opacity: 1;
}
