/* Custom Toast & Confirm System - Ledger Design */

/* Toast Container */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  pointer-events: none;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Toast Base */
.custom-toast {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  margin-bottom: 12px;
  padding: 0;
  min-width: 340px;
  max-width: 420px;
  opacity: 0;
  transform: translateX(120%);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  border: 1px solid #e5e5e5;
  overflow: hidden;
}

.custom-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.custom-toast-content {
  padding: 18px 20px;
  font-size: 14px;
  color: #1e1e1e;
  line-height: 1.6;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-toast-content::before {
  content: "";
  width: 4px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background: #666;
  border-radius: 8px 0 0 8px;
}

/* Toast Types with Icons */
.custom-toast-success .custom-toast-content::before {
  background: #142533;
}

.custom-toast-error .custom-toast-content::before {
  background: #dc2626;
}

.custom-toast-info .custom-toast-content::before {
  background: #666;
}

/* Status indicator dot */
.custom-toast-success .custom-toast-content::after,
.custom-toast-error .custom-toast-content::after,
.custom-toast-info .custom-toast-content::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  order: -1;
  margin-left: 8px;
}

.custom-toast-success .custom-toast-content::after {
  background: #142533;
  box-shadow: 0 0 0 3px rgba(20, 37, 51, 0.1);
}

.custom-toast-error .custom-toast-content::after {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.custom-toast-info .custom-toast-content::after {
  background: #666;
  box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.1);
}

/* Confirm Dialog Overlay */
.custom-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 37, 51, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.custom-confirm-overlay.show {
  opacity: 1;
}

/* Confirm Dialog */
.custom-confirm-dialog {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  max-width: 460px;
  width: 92%;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-confirm-overlay.show .custom-confirm-dialog {
  transform: scale(1) translateY(0);
}

.custom-confirm-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.custom-confirm-header h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  color: #1e1e1e;
  letter-spacing: -0.01em;
}

.custom-confirm-body {
  padding: 24px 28px;
  background: #ffffff;
}

.custom-confirm-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #666;
}

.custom-confirm-footer {
  padding: 20px 28px 24px;
  background: #ffffff;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #f0f0f0;
}

.custom-confirm-footer button {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.btn-confirm-cancel {
  background: transparent;
  color: #666;
  border: 1px solid #e5e5e5 !important;
}

.btn-confirm-cancel:hover {
  background: #fafafa;
  border-color: #cccccc !important;
  color: #333;
}

.btn-confirm-ok {
  background: #142533;
  color: #ffffff;
}

.btn-confirm-ok:hover {
  background: #0f1d28;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 37, 51, 0.25);
}

.btn-confirm-ok:active {
  transform: translateY(0);
}

/* Loading Overlay */
.custom-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 37, 51, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.custom-loader-overlay.show {
  opacity: 1;
}

.custom-loader-content {
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 32px 40px;
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.custom-spinner {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.custom-loader-content p {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Responsive */
@media (max-width: 640px) {
  #toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
  }

  .custom-toast {
    min-width: auto;
    max-width: 100%;
  }

  .custom-confirm-dialog {
    width: 95%;
    max-width: 95%;
  }

  .custom-confirm-header,
  .custom-confirm-body,
  .custom-confirm-footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .custom-loader-content {
    padding: 28px 32px;
  }
}
