/* ─────────────────────────────────────────────────────────────
 * IPC Toast Notification System
 * Compact, sleek, and aligned with system design tokens
 * ───────────────────────────────────────────────────────────── */

.ipc-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
    width: 380px;
}

[dir="rtl"] .ipc-toast-container {
    right: auto;
    left: 20px;
}

.ipc-toast-card {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transform: translateY(-12px) scale(0.97);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, box-shadow 0.2s ease;
}

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

.ipc-toast-card.ipc-toast-hide {
    transform: translateY(-12px) scale(0.97);
    opacity: 0;
}

.ipc-toast-card:hover {
    box-shadow: 0 8px 22px -3px rgba(15, 23, 42, 0.12), 0 3px 8px -1px rgba(15, 23, 42, 0.06);
}

/* Icon Box */
.ipc-toast-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ipc-toast-icon-wrap svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Variant: Sent (Soft Sky Blue) */
.ipc-toast-sent .ipc-toast-icon-wrap {
    background-color: #E0F2FE;
    color: #0284C7;
}
.ipc-toast-sent .ipc-toast-icon-wrap svg {
    stroke: #0284C7;
}

/* Variant: Approved / Success (Soft Green) */
.ipc-toast-approved .ipc-toast-icon-wrap,
.ipc-toast-success .ipc-toast-icon-wrap {
    background-color: #DCFCE7;
    color: #16A34A;
}
.ipc-toast-approved .ipc-toast-icon-wrap svg,
.ipc-toast-success .ipc-toast-icon-wrap svg {
    stroke: #16A34A;
}

/* Variant: Rejected / Error (Soft Red) */
.ipc-toast-rejected .ipc-toast-icon-wrap,
.ipc-toast-error .ipc-toast-icon-wrap {
    background-color: #FEE2E2;
    color: #DC2626;
}
.ipc-toast-rejected .ipc-toast-icon-wrap svg,
.ipc-toast-error .ipc-toast-icon-wrap svg {
    stroke: #DC2626;
}

/* Content */
.ipc-toast-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding-right: 18px;
}

[dir="rtl"] .ipc-toast-content {
    padding-right: 0;
    padding-left: 18px;
}

.ipc-toast-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 2px 0;
    line-height: 1.3;
    font-family: inherit;
}

.ipc-toast-message {
    font-size: 12px;
    font-weight: 400;
    color: #64748B;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    font-family: inherit;
}

/* Close button */
.ipc-toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94A3B8;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
    outline: none;
}

[dir="rtl"] .ipc-toast-close {
    right: auto;
    left: 8px;
}

.ipc-toast-close:hover {
    color: #475569;
    background-color: #F1F5F9;
}

@media (max-width: 576px) {
    .ipc-toast-container {
        top: 14px;
        right: 14px;
        left: 14px;
        width: auto;
        max-width: 100%;
    }
    .ipc-toast-card {
        padding: 9px 12px;
        gap: 10px;
        border-radius: 10px;
    }
    .ipc-toast-icon-wrap {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }
    .ipc-toast-icon-wrap svg {
        width: 18px;
        height: 18px;
    }
    .ipc-toast-title {
        font-size: 13px;
    }
    .ipc-toast-message {
        font-size: 11.5px;
    }
}
