/**
 * SkillBloomer – Unified Toast Notification Styles
 * Overrides toastr.min.css with a professional, modern design.
 * Used across Admin, Instructor, and Student panels.
 */

/* ─── Container Position ──────────────────────────────────────── */
#toast-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
}

#toast-container.toast-top-right {
    top: 20px;
    right: 20px;
}

/* ─── Base Toast Card ─────────────────────────────────────────── */
#toast-container>div {
    position: relative;
    pointer-events: auto;
    overflow: hidden;
    margin: 0 0 12px;
    padding: 16px 20px 16px 60px;
    width: 340px;
    max-width: calc(100vw - 40px);
    border-radius: 12px;
    background-position: 18px center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #fff;
    opacity: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-left: 4px solid rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#toast-container>div:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.12);
    opacity: 1;
    cursor: pointer;
    transform: translateY(-1px);
}

/* ─── Entry Animation ─────────────────────────────────────────── */
@keyframes sb-toast-in {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#toast-container>div {
    animation: sb-toast-in 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

/* ─── Title ───────────────────────────────────────────────────── */
.toast-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 3px;
    line-height: 1.3;
}

/* ─── Message ─────────────────────────────────────────────────── */
.toast-message {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.93;
    word-wrap: break-word;
}

.toast-message a,
.toast-message label {
    color: #fff;
    text-decoration: underline;
}

.toast-message a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

/* ─── Close Button ────────────────────────────────────────────── */
.toast-close-button {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    border: none;
    opacity: 0.8;
    transition: background 0.2s ease, opacity 0.2s ease;
    float: none;
}

.toast-close-button:hover,
.toast-close-button:focus {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    color: #fff;
    text-decoration: none;
}

/* ─── Progress Bar ────────────────────────────────────────────── */
.toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

/* ─── Success ─────────────────────────────────────────────────── */
.toast-success {
    background-color: #10b981 !important;
    /* Modern Green */
    border-left: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* ─── Error ───────────────────────────────────────────────────── */
.toast-error {
    background-color: #ef4444 !important;
    /* Modern Red */
    border-left: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E") !important;
}

/* ─── Info ────────────────────────────────────────────────────── */
.toast-info {
    background-color: #3b82f6 !important;
    /* Modern Blue */
    border-left: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E") !important;
}

/* ─── Warning ─────────────────────────────────────────────────── */
.toast-warning {
    background-color: #f59e0b !important;
    /* Modern Orange */
    border-left: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3E%3C/path%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E") !important;
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    #toast-container.toast-top-right {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    #toast-container>div {
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
    }
}