/* Poppins, self-hosted (public/vendor/poppins) */
@import url('/vendor/poppins/poppins.css');

* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Poppins', sans-serif;
}

:root {
      --dark: #34495E;
      --light: #ffffff;
      --success: #059669;
      --error: #dc2626;
      --warning: #d97706;
      --info: #2563eb;
}

/* Notification container */
.notifications {
      position: fixed;
      z-index: 99999;
      top: 30px;
      left: 50%;
      transform: translateX(-50%);
}

/* Toast base style */
.notifications :where(.toast, .column) {
      display: flex;
      align-items: center;
}

.notifications .toast {
      width: min(420px, calc(100vw - 32px));
      position: relative;
      overflow: hidden;
      list-style: none;
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 10px;
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(15, 23, 42, 0.08);
      justify-content: space-between;
      gap: 12px;
      box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
      animation: show_toast 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.notifications .toast:hover::before {
      animation-play-state: paused;
}

.toast .column {
      gap: 12px;
      min-width: 0;
}

/* Show/hide animations */
@keyframes show_toast {
      0% {
            transform: translateY(40px);
            opacity: 0;
      }

      100% {
            transform: translateY(0);
            opacity: 1;
      }
}

.notifications .toast.hide {
      animation: hide_toast 0.3s ease forwards;
}

@keyframes hide_toast {
      0% {
            transform: translateY(0);
            opacity: 1;
      }

      100% {
            transform: translateY(40px);
            opacity: 0;
      }
}

/* Progress bar animation */
.toast::before {
      position: absolute;
      content: "";
      height: 2px;
      width: 100%;
      bottom: 0px;
      left: 0px;
      opacity: 0.85;
      animation: progress 10s linear forwards;
}

.toast.success::before,
.btn#success {
      background: var(--success);
}

.toast.error::before,
.btn#error {
      background: var(--error);
}

.toast.warning::before,
.btn#warning {
      background: var(--warning);
}

.toast.info::before,
.btn#info {
      background: var(--info);
}


@keyframes progress {
      100% {
            width: 0%;
      }
}

/* Type-based styles */
.toast.success {
      border-left-color: var(--success);
}

.toast.error {
      border-left-color: var(--error);
}

.toast.warning {
      border-left-color: var(--warning);
}

.toast.info {
      border-left-color: var(--info);
}

/* Icons */
.toast .column i {
      width: 30px;
      height: 30px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 14px;
}

.toast.success .column i {
      color: var(--success);
      background: #ecfdf5;
}

.toast.error .column i {
      color: var(--error);
      background: #fef2f2;
}

.toast.warning .column i {
      color: var(--warning);
      background: #fffbeb;
}

.toast.info .column i {
      color: var(--info);
      background: #eff6ff;
}

/* Text content */
.toast .column span {
      font-size: 13.5px;
      line-height: 1.45;
      color: #0f172a;
      font-weight: 500;
}

/* Close icon */
.toast i:last-child {
      color: #aeb0d7;
      cursor: pointer;
      font-size: 1.3rem;
      transition: transform 0.2s ease, color 0.2s ease;
}

.toast i:last-child:hover {
      color: var(--info);
      transform: scale(1.2);
}

/* Buttons (if used) */
.buttons .btn {
      border: none;
      outline: none;
      cursor: pointer;
      margin: 0 5px;
      color: var(--light);
      font-size: 1.2rem;
      padding: 10px 20px;
      border-radius: 4px;
}

/* Mobile optimization */
@media screen and (max-width: 530px) {
      .notifications {
            width: 100%;
            top: 30px;
            /* Restore top */
            bottom: auto;
            /* Cancel bottom */
            left: 50%;
            transform: translateX(-50%);
            padding: 0 10px;
      }

      .notifications .toast {
            width: 100%;
            font-size: 1rem;
            margin-left: 0;
      }

      .toast .column i {
            font-size: 1.5rem;
      }

      .toast .column span {
            font-size: 1rem;
            margin-left: 10px;
      }

      .toast i:last-child {
            font-size: 1.25rem;
      }

      .buttons .btn {
            margin: 0 1px;
            font-size: 1.1rem;
            padding: 8px 15px;
      }
}
/* Close control is a real <button> now (keyboard accessible, no inline onclick). */
.toast .toast-close {
      background: none;
      border: 0;
      cursor: pointer;
      width: 26px;
      height: 26px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #64748b;
      font-size: 15px;
      flex-shrink: 0;
      transition: background 0.15s ease, color 0.15s ease;
}
.toast .toast-close:hover {
      background: rgba(15, 23, 42, 0.06);
      color: #0f172a;
}
