/* ═══════════════════════════════════════════════════════════════════════════
   Toast component — app-wide skin for toastr notifications.

   toastr ships a flat, saturated block. This replaces it with a tinted card
   that is colour-typed end to end (fill, border, accent edge, title, message,
   icon and progress bar) so a success and a failure are told apart instantly.

   Load AFTER resources/libraries/toast/toastr.min.css. Included from
   resources/general-links/general-css.php, plus directly on the handful of
   pages that pull toastr in without that include.

   toastr marks its own icon backgrounds !important, so the replacement icons
   have to as well — that is the only place !important is used here.
   ═══════════════════════════════════════════════════════════════════════════ */

#toast-container > div {
    font-family: 'Inter', 'Poppins', sans-serif;
    width: 340px;
    max-width: calc(100vw - 32px);
    padding: 13px 34px 14px 48px;
    border-radius: 10px;
    border: 1px solid #e8ecf1;
    border-left: 5px solid #94a3b8;
    background-color: #fff;
    background-position: 17px 14px;
    background-size: 20px 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
    opacity: 1;
    color: #1e293b;
}

#toast-container > div:hover {
    box-shadow: 0 14px 36px rgba(15, 23, 42, .2);
    opacity: 1;
}

#toast-container > div .toast-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .01em;
}

#toast-container > div .toast-message {
    font-size: 12.5px;
    font-weight: 400;
    color: #475569;
    line-height: 1.45;
    margin-top: 2px;
}

#toast-container > div .toast-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    color: #cbd5e1;
    text-shadow: none;
    opacity: 1;
}

#toast-container > div .toast-close-button:hover,
#toast-container > div .toast-close-button:focus {
    color: #64748b;
    opacity: 1;
}

#toast-container > div .toast-progress {
    background-color: #94a3b8;
    opacity: .35;
    height: 3px;
    border-radius: 0 0 10px 10px;
}

/* ── Positive ── */
#toast-container > .toast-success {
    border-color: #bbf7d0;
    border-left-color: #16a34a;
    background-color: #f0fdf4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2316a34a'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-success .toast-title { color: #14532d; }
#toast-container > .toast-success .toast-message { color: #166534; }
#toast-container > .toast-success .toast-close-button { color: #86c79a; }
#toast-container > .toast-success .toast-progress { background-color: #16a34a; }

/* ── Negative ── */
#toast-container > .toast-error {
    border-color: #fecaca;
    border-left-color: #dc2626;
    background-color: #fef2f2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ef4444'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-error .toast-title { color: #7f1d1d; }
#toast-container > .toast-error .toast-message { color: #b91c1c; }
#toast-container > .toast-error .toast-close-button { color: #e59a9a; }
#toast-container > .toast-error .toast-progress { background-color: #dc2626; }

/* ── Caution ── */
#toast-container > .toast-warning {
    border-color: #fcd34d;
    border-left-color: #f59e0b;
    background-color: #fffbeb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23f59e0b'%3E%3Cpath fill-rule='evenodd' d='M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-warning .toast-title { color: #78350f; }
#toast-container > .toast-warning .toast-message { color: #92400e; }
#toast-container > .toast-warning .toast-close-button { color: #dcb579; }
#toast-container > .toast-warning .toast-progress { background-color: #f59e0b; }

/* ── Informational ── */
#toast-container > .toast-info {
    border-color: #bfdbfe;
    border-left-color: #1a73e8;
    background-color: #eff6ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231a73e8'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-info .toast-title { color: #1e3a8a; }
#toast-container > .toast-info .toast-message { color: #1d4ed8; }
#toast-container > .toast-info .toast-close-button { color: #93b4e5; }
#toast-container > .toast-info .toast-progress { background-color: #1a73e8; }

@media (max-width: 480px) {
    #toast-container > div { width: calc(100vw - 32px); }
}
