/**
 * Global Toast Notification System Stylesheet
 * Location: public/assets/css/toast.css
 */

.tc-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 440px;
    width: calc(100vw - 32px);
}

@media (max-width: 576px) {
    .tc-toast-container {
        top: 14px;
        right: 14px;
        left: 14px;
        width: auto;
        max-width: none;
    }
}

.tc-toast {
    pointer-events: auto;
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    padding: 14px 16px 16px 14px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.16), 0 8px 16px -6px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.95);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, max-height 0.35s ease, margin 0.3s ease, padding 0.3s ease;
    max-height: 600px;
}

.tc-toast.tc-toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.tc-toast.tc-toast-hiding {
    transform: translateX(120%) scale(0.96);
    opacity: 0;
    margin-bottom: -12px;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

/* Color Variant Accents */
.tc-toast-success {
    border-left: 4.5px solid #10b981;
}
.tc-toast-error {
    border-left: 4.5px solid #ef4444;
}
.tc-toast-warning {
    border-left: 4.5px solid #f59e0b;
}
.tc-toast-info {
    border-left: 4.5px solid #0284c7;
}

/* Icon Badges */
.tc-toast-icon-wrapper {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ffffff;
    flex-shrink: 0;
    margin-top: 1px;
}

.tc-toast-success .tc-toast-icon-wrapper {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.tc-toast-error .tc-toast-icon-wrapper {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.tc-toast-warning .tc-toast-icon-wrapper {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.tc-toast-info .tc-toast-icon-wrapper {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* Content Area */
.tc-toast-content {
    flex-grow: 1;
    min-width: 0;
}

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

.tc-toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.tc-toast-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tc-toast-success .tc-toast-badge {
    background: #dcfce7;
    color: #15803d;
}

.tc-toast-error .tc-toast-badge {
    background: #fee2e2;
    color: #b91c1c;
}

.tc-toast-warning .tc-toast-badge {
    background: #fef3c7;
    color: #b45309;
}

.tc-toast-info .tc-toast-badge {
    background: #e0f2fe;
    color: #0369a1;
}

.tc-toast-body {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.45;
    word-break: break-word;
}

.tc-toast-body ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
}

.tc-toast-body li {
    margin-bottom: 2px;
}

/* Copy chip inside toast */
.tc-toast-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 8px;
    font-family: monospace;
    font-weight: 700;
    color: #00518b;
    margin-top: 6px;
}

.tc-toast-chip button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #64748b;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.tc-toast-chip button:hover {
    color: #00518b;
}

/* Close Button */
.tc-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.15s ease;
    font-size: 0.85rem;
}

.tc-toast-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Animated Progress Bar */
.tc-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left center;
}

.tc-toast-success .tc-toast-progress {
    background: #10b981;
}
.tc-toast-error .tc-toast-progress {
    background: #ef4444;
}
.tc-toast-warning .tc-toast-progress {
    background: #f59e0b;
}
.tc-toast-info .tc-toast-progress {
    background: #0284c7;
}

/* Pause progress bar on toast hover */
.tc-toast:hover .tc-toast-progress {
    animation-play-state: paused !important;
}

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