/**
 * Electra HMIS Custom Toast Notification Styling
 * Features:
 * - Fixed Bottom-Left clinical card layout
 * - Prominent Big Bold Title
 * - Crisp SVG Status Badge with outer dashed ring and inner solid badge
 * - Dedicated Footer separated by clean border
 * - Teal #00a8a8 Ok action button for instant dismissal
 * - Full Dark Mode parity
 */

@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist-Variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

#custom-toast-container {
    position: fixed !important;
    bottom: 16px !important;
    right: 16px !important;
    left: auto !important;
    z-index: 99999999 !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 10px !important;
    pointer-events: none !important;
    max-width: calc(100vw - 24px) !important;
    font-family: 'Geist', sans-serif !important;
}

.custom-toast {
    pointer-events: auto !important;
    position: relative !important;
    width: 340px !important;
    max-width: calc(100vw - 24px) !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateY(10px) scale(0.98);
    opacity: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease !important;
    font-family: 'Geist', sans-serif !important;
}

.custom-toast *,
.custom-toast-title,
.custom-toast-message,
.custom-toast-ok-btn {
    font-family: 'Geist', sans-serif !important;
}

.custom-toast.custom-toast-visible {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
}

.custom-toast.custom-toast-hiding {
    transform: translateY(6px) scale(0.96) !important;
    opacity: 0 !important;
}

/* Dark Mode */
.dark #custom-toast-container .custom-toast {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.6) !important;
}

/* Body Section - clean compact outside padding, generous footer gap */
.custom-toast-body {
    padding: 14px 16px 52px 14px !important;
    background: #ffffff !important;
}

.dark .custom-toast-body {
    background: #1e293b !important;
}

.custom-toast-top-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

/* Icon Column */
.custom-toast-icon-col {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    margin-top: 1px !important;
}

.custom-toast-icon {
    width: 44px !important;
    height: 44px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Text Column */
.custom-toast-text-col {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

/* Big Title (24px Extra Bold, exclusively Geist) */
.custom-toast-title {
    font-family: 'Geist', sans-serif !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.15 !important;
}

.custom-toast-error .custom-toast-title {
    color: #ef4444 !important;
}

.custom-toast-success .custom-toast-title {
    color: #16a34a !important;
}

.custom-toast-warning .custom-toast-title {
    color: #d97706 !important;
}

.custom-toast-info .custom-toast-title {
    color: #0284c7 !important;
}

/* Message (Exclusively Geist) */
.custom-toast-message {
    font-family: 'Geist', sans-serif !important;
    font-size: 13.5px !important;
    color: #475569 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.45 !important;
    word-break: break-word !important;
}

.dark .custom-toast-message {
    color: #cbd5e1 !important;
}

/* Footer Section - Button in Left with neat compact padding */
.custom-toast-footer {
    border-top: 1px solid #eef2f6 !important;
    padding: 8px 14px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.dark .custom-toast-footer {
    border-top-color: #334155 !important;
    background: #1e293b !important;
}

/* Ok Button (Left-aligned, Exclusively Geist) */
.custom-toast-ok-btn {
    font-family: 'Geist', sans-serif !important;
    background: #00a8a8 !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    border-radius: 4px !important;
    padding: 5px 22px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(0, 168, 168, 0.2) !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
    line-height: 1.4 !important;
}

.custom-toast-ok-btn:hover {
    background: #008f8f !important;
}

.custom-toast-ok-btn:active {
    background: #007a7a !important;
    transform: scale(0.98) !important;
}

/* Fallback harmonization for any direct #toast-container */
#toast-container.toast-bottom-left {
    bottom: 20px !important;
    left: 20px !important;
    top: auto !important;
    right: auto !important;
}
