/* ===== Backdrop blocks background ===== */
#todoBackdrop.todo-backdrop{
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 19990;
}

#todoToast.todo-toast{
  position: fixed;
  right: 10px;
  bottom: 20px;
  width: 288px;
  max-width: 288px;
  z-index: 20000;
  background: transparent;
}

/* Optional: if Liferay footer overlaps, increase bottom:
#todoToast.todo-toast{ bottom: 70px; }
*/

.todo-popup-wrap{
/*  padding: 14px 16px 12px 16px;*/
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Header */

.todo-header{
	width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #074280;
    color: #ffffff;

    padding: 14px 14px;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.25);
    margin-bottom: 14px;
    background-color: var(--main-bg-color);
    border-top-left-radius: 10px !important;
    color: white;

    height: 47px;
    padding-bottom: 13px;

    border-top-right-radius: 10px !important;
}
.todo-header-left{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}

.todo-title{
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 42px;
  height: 18px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #0b1f44;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.16);
}

/* Close button */
.todo-closebtn{
/*  width: 34px;
  height: 34px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;*/
      width: 25px;
    height: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.todo-closebtn:hover{
  background: #dc3545;
  border-color: rgba(255,255,255,0.8);
}

/* Pills */
.todo-pill{
  width: 100%;
  box-sizing: border-box;
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 14px;
  margin: 10px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

#todoList{
	padding-bottom: 5px;
}

/* 4-color repeating cycle (light pastels as per your last requirements) */
#todoList .todo-pill:nth-child(4n+1){
  background: #DDF1D8 !important;
}
#todoList .todo-pill:nth-child(4n+2){
  background: #DBECF6 !important;
}
#todoList .todo-pill:nth-child(4n+3){
  background: #FDF8E3 !important;
}
#todoList .todo-pill:nth-child(4n+4){
  background: #F1DEDF !important;
}
 
.todo-pill-left{
  font-weight: 700;    
  letter-spacing: 0.4px;
  font-size: 13px;
  color: black !important;
}
.todo-pill-right{
  font-weight: 900;
  font-size: 13px;
  min-width: 32px;
  text-align: right;
  color: black !important;
}

.todo-pill a{
  color: black !important;
}

.todo-pill a:hover{
  color: #074280 !important;
}



/* Footer */
.todo-footer{
  padding-top: 6px;
  display:flex;
  justify-content:flex-end;
}
.todo-footer a{
  font-size: 14px;
  color: #0d6efd;
  text-decoration: underline;
  font-weight: 600;
}

/* Slide-in animation */
.todo-toast-show{
  animation: todoSlideIn 220ms ease-out;
}
@keyframes todoSlideIn{
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Prevent background scroll when toast is open */
body.todo-modal-open{
  overflow: hidden !important;
}


/* Slide-in from bottom-right to fixed position */
.todo-toast-show-br {
  animation: todoSlideInBR 220ms ease-out;
}

@keyframes todoSlideInBR {
  from {
    opacity: 0;
    transform: translate(24px, 24px); /* start a bit down and right */
  }
  to {
    opacity: 1;
    transform: translate(0, 0);       /* end exactly at right/bottom defined in CSS */
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .todo-toast-show-br {
    animation: none;
  }
}

/* Slow slide-in from bottom to final fixed position */
#todoToast {
  /* You can tweak these without editing keyframes */
  --todo-toast-duration: 1.5s;   /* increase to 6s/8s for even slower */
  --todo-toast-distance: 120px; /* how far it starts below the final spot */
}

.todo-toast-show-up {
  animation: todoSlideInUp var(--todo-toast-duration) linear both;
}

@keyframes todoSlideInUp {
  from {
    opacity: 0.5;
    transform: translateY(var(--todo-toast-distance)); /* start below */
  }
  to {
    opacity: 1;
    transform: translateY(0);                           /* end at right/bottom */
  }
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .todo-toast-show-up { animation: none; }
}