/* ==========================================================================
   Toastr theme — modern card-style alerts (success / error / warning / info)
   Loaded after toastr.min.css in every layout. Edit only this file.
   ========================================================================== */

#toast-container {
    z-index: 999999;
}

#toast-container.toast-top-right,
#toast-container.toast-bottom-right {
    right: 16px;
}

#toast-container.toast-top-right,
#toast-container.toast-top-left,
#toast-container.toast-top-center {
    top: 16px;
}

#toast-container > div.toast {
    --toast-accent: #6b7280;
    --toast-soft: #f3f4f6;
    --toast-icon: none;

    position: relative;
    display: block;
    width: 360px;
    max-width: calc(100vw - 32px);
    min-height: 64px;
    margin: 0 0 12px;
    padding: 14px 44px 14px 64px;
    border: 1px solid #eef0f3;
    border-radius: 14px;
    background: #fff !important;
    background-image: none !important;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.45;
    opacity: 1;
    overflow: hidden;
    box-shadow:
        inset 4px 0 0 var(--toast-accent),
        0 12px 32px -10px rgba(15, 23, 42, 0.22),
        0 2px 6px rgba(15, 23, 42, 0.06);
    animation: toastSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1);
}

#toast-container > div.toast:hover {
    opacity: 1;
    cursor: pointer;
    box-shadow:
        inset 4px 0 0 var(--toast-accent),
        0 16px 40px -10px rgba(15, 23, 42, 0.28),
        0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Icon badge */
#toast-container > div.toast::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 16px;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border-radius: 50%;
    background: var(--toast-icon) center / 18px 18px no-repeat, var(--toast-soft);
}

/* Title + message */
#toast-container > div.toast .toast-title {
    margin-bottom: 2px;
    color: #111827;
    font-size: 14.5px;
    font-weight: 700;
}

#toast-container > div.toast .toast-message {
    color: #1f2937;
    font-weight: 500;
    word-wrap: break-word;
}

#toast-container > div.toast .toast-title + .toast-message {
    color: #4b5563;
    font-weight: 400;
}

#toast-container > div.toast .toast-message a,
#toast-container > div.toast .toast-message label {
    color: var(--toast-accent);
}

/* Close button */
#toast-container > div.toast .toast-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    float: none;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 20px;
    font-weight: 400;
    line-height: 26px;
    text-align: center;
    text-shadow: none;
    opacity: 1;
    transition: background-color 0.15s, color 0.15s;
}

#toast-container > div.toast .toast-close-button:hover,
#toast-container > div.toast .toast-close-button:focus {
    background-color: #f3f4f6;
    color: #374151;
    opacity: 1;
}

/* Progress bar */
#toast-container > div.toast .toast-progress {
    height: 3px;
    background-color: var(--toast-accent);
    opacity: 0.85;
}

/* ---------- Variants ---------- */
#toast-container > div.toast-success {
    --toast-accent: #16a34a;
    --toast-soft: #dcfce7;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

#toast-container > div.toast-error {
    --toast-accent: #dc2626;
    --toast-soft: #fee2e2;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

#toast-container > div.toast-warning {
    --toast-accent: #f59e0b;
    --toast-soft: #fef3c7;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8v5M12 17h.01'/%3E%3C/svg%3E");
}

#toast-container > div.toast-info {
    --toast-accent: #2563eb;
    --toast-soft: #dbeafe;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E");
}

/* ---------- Animation ---------- */
@keyframes toastSlideIn {
    from { transform: translateX(24px); }
    to   { transform: translateX(0); }
}

@keyframes toastSlideInY {
    from { transform: translateY(-12px); }
    to   { transform: translateY(0); }
}

#toast-container.toast-top-left > div.toast,
#toast-container.toast-bottom-left > div.toast,
#toast-container.toast-top-center > div.toast,
#toast-container.toast-bottom-center > div.toast,
#toast-container.toast-top-full-width > div.toast,
#toast-container.toast-bottom-full-width > div.toast {
    animation-name: toastSlideInY;
}

@media (prefers-reduced-motion: reduce) {
    #toast-container > div.toast { animation: none; }
}

/* ---------- RTL ---------- */
[dir="rtl"] #toast-container > div.toast {
    padding: 14px 64px 14px 44px;
    box-shadow:
        inset -4px 0 0 var(--toast-accent),
        0 12px 32px -10px rgba(15, 23, 42, 0.22),
        0 2px 6px rgba(15, 23, 42, 0.06);
}

[dir="rtl"] #toast-container > div.toast::before {
    left: auto;
    right: 16px;
}

[dir="rtl"] #toast-container > div.toast .toast-close-button {
    right: auto;
    left: 10px;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
    #toast-container.toast-top-right,
    #toast-container.toast-bottom-right {
        right: 12px;
        left: 12px;
    }

    #toast-container > div.toast {
        width: 100%;
        max-width: none;
    }
}

/* ==========================================================================
   Inline page alerts (.alert.alert-*) — same card language as the toasts
   ========================================================================== */
.alert.alert-success,
.alert.alert-danger,
.alert.alert-warning,
.alert.alert-info {
    --alert-accent: #6b7280;
    --alert-soft: #f3f4f6;
    --alert-tint: #f9fafb;
    --alert-icon: none;

    position: relative;
    padding: 8px 14px 8px 52px;
    border: 1px solid var(--alert-soft);
    border-radius: 10px;
    background: linear-gradient(90deg, var(--alert-tint) 0%, #fff 60%);
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    box-shadow:
        inset 4px 0 0 var(--alert-accent),
        0 2px 6px rgba(15, 23, 42, 0.05);
}

.alert.alert-dismissible.alert-success,
.alert.alert-dismissible.alert-danger,
.alert.alert-dismissible.alert-warning,
.alert.alert-dismissible.alert-info {
    padding-right: 48px;
}

/* Icon badge */
.alert.alert-success::before,
.alert.alert-danger::before,
.alert.alert-warning::before,
.alert.alert-info::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 16px;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    border-radius: 50%;
    background: var(--alert-icon) center / 14px 14px no-repeat, var(--alert-soft);
}

/* Action button inside an alert */
.alert.alert-success .btn,
.alert.alert-danger .btn,
.alert.alert-warning .btn,
.alert.alert-info .btn {
    padding: 3px 14px;
    border: 1px solid var(--alert-accent);
    border-radius: 999px;
    background: transparent;
    color: var(--alert-accent);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.alert.alert-success .btn:hover,
.alert.alert-danger .btn:hover,
.alert.alert-warning .btn:hover,
.alert.alert-info .btn:hover,
.alert.alert-success .btn:focus,
.alert.alert-danger .btn:focus,
.alert.alert-warning .btn:focus,
.alert.alert-info .btn:focus {
    background: var(--alert-accent);
    color: #fff;
}

.alert.alert-success a:not(.btn),
.alert.alert-danger a:not(.btn),
.alert.alert-warning a:not(.btn),
.alert.alert-info a:not(.btn) {
    color: var(--alert-accent);
    font-weight: 600;
}

/* ---------- Variants ---------- */
.alert.alert-success {
    --alert-accent: #16a34a;
    --alert-soft: #dcfce7;
    --alert-tint: #f0fdf4;
    --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.alert.alert-danger {
    --alert-accent: #dc2626;
    --alert-soft: #fee2e2;
    --alert-tint: #fef2f2;
    --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

.alert.alert-warning {
    --alert-accent: #d97706;
    --alert-soft: #fef3c7;
    --alert-tint: #fffbeb;
    --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
}

.alert.alert-info {
    --alert-accent: #2563eb;
    --alert-soft: #dbeafe;
    --alert-tint: #eff6ff;
    --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
}
