/* Toast Notifications Container - Top Middle of the Page */
.app-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    pointer-events: none;
    width: 100%;
    max-width: 480px;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Individual Toast Card */
.app-toast-card {
    pointer-events: auto;
    position: relative;
    width: 100%;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.16), 0 6px 14px -2px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    padding: 16px 16px 18px 16px;
    gap: 14px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    animation: appToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.app-toast-card.toast-closing {
    animation: appToastSlideOut 0.25s ease forwards;
}

@keyframes appToastSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes appToastSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-16px) scale(0.95);
    }
}

/* Type variations */
/* Error (Red) */
.app-toast-card.toast-error {
    border-left: 6px solid #DC2626;
}
.app-toast-card.toast-error .app-toast-title {
    color: #82181A;
}
.app-toast-card.toast-error .app-toast-track {
    background: #FEE2E2;
}
.app-toast-card.toast-error .app-toast-bar {
    background: #DC2626;
}

/* Warning / Action Required (Orange) */
.app-toast-card.toast-warning {
    border-left: 6px solid #D97706;
}
.app-toast-card.toast-warning .app-toast-title {
    color: #78350F;
}
.app-toast-card.toast-warning .app-toast-track {
    background: #FEF3C7;
}
.app-toast-card.toast-warning .app-toast-bar {
    background: #D97706;
}

/* Success (Green) */
.app-toast-card.toast-success {
    border-left: 6px solid #16A34A;
}
.app-toast-card.toast-success .app-toast-title {
    color: #14532D;
}
.app-toast-card.toast-success .app-toast-track {
    background: #DCFCE7;
}
.app-toast-card.toast-success .app-toast-bar {
    background: #16A34A;
}

/* Icon */
.app-toast-icon-wrap {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

/* Body / Text */
.app-toast-body {
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}

.app-toast-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.app-toast-message {
    font-size: 14px;
    font-weight: 400;
    color: #4B5563;
    line-height: 1.45;
    margin: 0;
    word-break: break-word;
}

/* Close button */
.app-toast-close {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    margin: -2px -2px 0 0;
    transition: all 0.15s ease;
}

.app-toast-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #374151;
}

/* Progress / Timer Bar */
.app-toast-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    overflow: hidden;
}

.app-toast-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transition: width linear;
}
