/* ##################### CSS for Django Floating Toast Messages #####################  */

/* Toast Container */
.toast-container {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;

  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: auto;
  max-width: 90%;
  padding: 0 10px;
}

/* Toast Message */
.message {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 300px;
  max-width: 600px;
  width: 100%;

  padding: 12px 48px 12px 16px;
  border-radius: 10px;

  font-size: 15px;
  font-weight: 500;
  color: #fff;

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease-out;
}

/* Variants */
.success { background: #28a745; }
.info    { background: #007bff; }
.warning { background: #ffc107; color: #000; } /* black text for contrast */
.error   { background: #f44336; }

/* Icon Styling */
.message .icon {
  font-size: 20px;
  display: flex;
  align-items: center;
}

/* Close Button */
.message .close-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);

  width: 28px;
  height: 28px;
  border-radius: 50%;

  font-size: 20px;
  font-weight: bold;
  line-height: 28px;
  text-align: center;

  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;

  transition: all 0.25s ease;
}

.message .close-btn:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-50%) scale(1.2);
}

/* Fade In Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}




/*************** Fixed Notification Styling ***********************************/

/* Icon Styling */
.message .icon {
  font-size: 18px;
  display: flex;
  align-items: center;
}

/* Toast Message */
.noti_message {
  position: relative;
  display: flex;
  align-items: right;
  gap: 10px;

  min-width: 300px;
  max-width: 600px;
  width: 100%;

  padding: 12px 48px 12px 16px;
  border-radius: 10px;

  font-size: 15px;
  font-weight: 500;
  color: #fff;

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease-out;
}

/* Close Button */
.message_closebtn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;

  font-weight: bold;
  font-size: 16px;
  line-height: 20px;

  color: #fff;
  background-color: rgba(0,0,0,0.3);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  text-align: center;

  transition: background-color 0.2s, transform 0.2s;
},
.message_closebtn:hover {
  background-color: rgba(0,0,0,0.6);
  transform: translateY(-50%) scale(1.1);
}

/* Notification Animation */
.noti_animation {
  animation: noti_fadeinout 6s ease-in-out forwards;
}
@keyframes noti_fadeinout {
  0%,100% { opacity: 0; }
  10%,80% { opacity: 1; }
}

/************** Table Row Highlight Animations *****************/

.add_animation td {
    animation: add_fadeinout 4s linear forwards;
}

/* keyframes allows us to add animations */
@keyframes add_fadeinout {
  0%,100% { background-color: transparent; }
  25% { background-color: rgb(76, 175, 80);}
}


.edit_animation td {
    animation: edit_fadeinout 4s linear forwards;
}

@keyframes edit_fadeinout {
  0%,100% { background-color: transparent; }
  25% { background-color: rgb(0, 156, 255);}
}

.delete_animation td {
    animation: delete_fadeinout 4s linear forwards;
}

@keyframes delete_fadeinout {
  0%,100% { background-color: transparent; }
  25% { background-color: #f44336;}
}
