/* ============================================================
   ComPilot — CoreSG Toast Component
   Source: https://spdataforge.com/coresg/toasts
   ============================================================ */

/* ---- Container ---- */
.csg-toast-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.csg-toast-container--top-right    { top: 1.25rem; right: 1.25rem; align-items: flex-end; }
.csg-toast-container--top-left     { top: 1.25rem; left: 1.25rem;  align-items: flex-start; }
.csg-toast-container--bottom-right { bottom: 1.25rem; right: 1.25rem; align-items: flex-end; }
.csg-toast-container--bottom-left  { bottom: 1.25rem; left: 1.25rem;  align-items: flex-start; }
.csg-toast-container--top-center   { top: 1.25rem; left: 50%; transform: translateX(-50%); align-items: center; }
.csg-toast-container--bottom-center{ bottom: 1.25rem; left: 50%; transform: translateX(-50%); align-items: center; }

/* ---- Toast base ---- */
.csg-toast {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13), 0 1.5px 6px rgba(0,0,0,0.07);
    padding: 14px 16px 10px 14px;
    border-left: 4px solid transparent;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.csg-toast.csg-toast--hiding {
    opacity: 0;
    transform: translateX(24px);
}

/* ---- Variants ---- */
.csg-toast--success { border-left-color: #198754; }
.csg-toast--danger  { border-left-color: #dc3545; }
.csg-toast--warning { border-left-color: #fd7e14; }
.csg-toast--info    { border-left-color: #0d6efd; }

/* ---- Icon ---- */
.csg-toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

.csg-toast--success .csg-toast__icon { color: #198754; }
.csg-toast--danger  .csg-toast__icon { color: #dc3545; }
.csg-toast--warning .csg-toast__icon { color: #fd7e14; }
.csg-toast--info    .csg-toast__icon { color: #0d6efd; }

/* ---- Content ---- */
.csg-toast__body {
    flex: 1;
    min-width: 0;
}

.csg-toast__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 2px;
}

.csg-toast__text {
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.5;
}

/* ---- Close button ---- */
.csg-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    margin-top: 1px;
    transition: color 0.15s;
}

.csg-toast__close:hover { color: #374151; }

/* ---- Progress bar ---- */
.csg-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transition: width linear;
}

.csg-toast--success .csg-toast__progress { background: #198754; }
.csg-toast--danger  .csg-toast__progress { background: #dc3545; }
.csg-toast--warning .csg-toast__progress { background: #fd7e14; }
.csg-toast--info    .csg-toast__progress { background: #0d6efd; }
