/**
 * ZEALOT CAPITAL ASSET
 * Institutional Success Toast Notification System Stylesheet
 * Direction-Aware (LTR / RTL), Midnight Navy & Metallic Gold Design
 */

#zealot-toast-container {
  position: fixed;
  top: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 440px;
  width: calc(100% - 32px);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* LTR Positioning */
body:not(.rtl-mode) #zealot-toast-container,
[dir="ltr"] #zealot-toast-container {
  right: 24px;
  left: auto;
}

/* RTL Positioning */
body.rtl-mode #zealot-toast-container,
[dir="rtl"] #zealot-toast-container {
  left: 24px;
  right: auto;
}

/* Single Toast Card */
.zealot-toast {
  pointer-events: auto;
  position: relative;
  background: linear-gradient(135deg, #071A32 0%, #0B2344 100%);
  border: 1px solid var(--color-metallic-gold, #C99A35);
  border-radius: 4px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(216, 181, 106, 0.2);
  color: #FFFFFF;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              max-height 0.3s ease,
              margin 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.zealot-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.zealot-toast.hide {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

/* Top Accent Bar */
.zealot-toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #C99A35 0%, #D8B56A 50%, #C99A35 100%);
  z-index: 2;
}

/* Toast Inner Content */
.zealot-toast-inner {
  display: flex;
  align-items: flex-start;
  padding: 16px 18px 14px 18px;
  gap: 14px;
}

/* Status Icon Container */
.zealot-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  background: rgba(201, 154, 53, 0.15);
  border: 1px solid rgba(201, 154, 53, 0.4);
  color: var(--color-metallic-gold, #C99A35);
}

.zealot-toast.toast-error .zealot-toast-icon {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
  color: #EF4444;
}

.zealot-toast.toast-error::before {
  background: linear-gradient(90deg, #DC2626 0%, #F87171 100%);
}

.zealot-toast.toast-info .zealot-toast-icon {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
  color: #38BDF8;
}

/* Toast Text Body */
.zealot-toast-body {
  flex-grow: 1;
  min-width: 0;
}

.zealot-toast-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.zealot-toast-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.2;
}

.zealot-toast-ref {
  display: inline-block;
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--color-champagne-gold, #D8B56A);
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid rgba(216, 181, 106, 0.3);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.zealot-toast-message {
  font-size: 0.84rem;
  line-height: 1.5;
  color: #CBD5E1;
  margin: 0;
  word-break: break-word;
}

/* Close Button */
.zealot-toast-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s ease;
  margin-inline-start: 4px;
}

.zealot-toast-close:hover {
  color: #FFFFFF;
}

/* Progress Duration Bar */
.zealot-toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--color-metallic-gold, #C99A35);
  transform-origin: left;
  transition: width linear;
}

body.rtl-mode .zealot-toast-progress-bar,
[dir="rtl"] .zealot-toast-progress-bar {
  left: auto;
  right: 0;
  transform-origin: right;
}

.zealot-toast.toast-error .zealot-toast-progress-bar {
  background: #EF4444;
}

.zealot-toast:hover .zealot-toast-progress-bar {
  animation-play-state: paused !important;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
  #zealot-toast-container {
    top: 16px;
    left: 16px !important;
    right: 16px !important;
    width: auto;
    max-width: none;
  }
}
