:root {
  --color-blue: 75, 186, 231;
  --color-green: 46, 204, 113;
  --color-orange: 255, 165, 0;
  --color-red: 234, 51, 35;
}

#notificationContainer {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  max-width: 500px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  position: relative;
  transform: translateX(-100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: auto;
  max-width: 100%;
  &.show {
    transform: translateX(0);
    opacity: 1;
  }
  &.hide {
    transform: translateX(-100%);
    opacity: 0;
  }
  &.info,
  &.tx-notification.pending {
    --notif-color: var(--color-blue);
  }
  &.success,
  &.tx-notification.success {
    --notif-color: var(--color-green);
  }
  &.warning {
    --notif-color: var(--color-orange);
  }
  &.danger,
  &.tx-notification.failed {
    --notif-color: var(--color-red);
  }

  .notif-content {
    color: rgb(var(--notif-color));
    background-color: rgba(var(--notif-color), 0.1);
    border-left: 4px solid rgb(var(--notif-color));
    box-shadow: 0 4px 8px rgba(var(--notif-color), 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
  }
}

.notif-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  border-radius: 50%;
  transition: background-color 0.3s;
  &:hover {
    background-color: rgba(var(--notif-color), 0.2);
  }
}

.notification.tx-notification {
  &.pending .tx-icon {
    color: rgb(var(--color-blue));
  }
  &.success .tx-icon {
    color: rgb(var(--color-green));
  }
  &.failed .tx-icon {
    color: rgb(var(--color-red));
  }
  &.success .tx-icon::before {
    content: "✓";
    font-size: 20px;
    font-weight: bold;
  }
  &.failed .tx-icon::before {
    content: "✗";
    font-size: 20px;
    font-weight: bold;
  }
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: currentColor;
  opacity: 0.6;
  transform-origin: left;
  animation: progress linear;
}

@keyframes progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.tx-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.tx-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: tx-spin 0.8s linear infinite;
}

@keyframes tx-spin {
  to {
    transform: rotate(360deg);
  }
}

.tx-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tx-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-txt);
}
.tx-hash {
  font-size: 12px;
  color: var(--color-txt);
  opacity: 0.8;
  a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
    &:hover {
      opacity: 1;
      text-decoration: underline;
    }
  }
}
.tx-status {
  font-size: 12px;
  margin-left: 8px;
  font-weight: 500;
  color: var(--color-txt);
  opacity: 0.9;
  white-space: nowrap;
}

@media (max-width: 480px) {
  #notificationContainer {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }
  .notif-content {
    padding: 12px 16px;
    font-size: 14px;
  }
  .tx-icon {
    width: 28px;
    height: 28px;
  }
  .tx-spinner {
    width: 16px;
    height: 16px;
  }
}
