/* Medicta UI V2 Modern Toast Notifications Styling */

/* Position rules */
.toast-center-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.toast-top-center {
    top: 16px;
    right: 0;
    width: 100%;
}
.toast-bottom-center {
    bottom: 16px;
    right: 0;
    width: 100%;
}
.toast-top-full-width {
    top: 0;
    right: 0;
    width: 100%;
}
.toast-bottom-full-width {
    bottom: 0;
    right: 0;
    width: 100%;
}
.toast-top-left {
    top: 16px;
    left: 16px;
}
.toast-top-right {
    top: 16px;
    right: 16px;
}
.toast-bottom-right {
    right: 16px;
    bottom: 16px;
}
.toast-bottom-left {
    bottom: 16px;
    left: 16px;
}

/* Toast container & base layout */
.toast-container {
    pointer-events: none;
    position: fixed;
    z-index: 999999;
}
.toast-container * {
    box-sizing: border-box;
}

/* Modern Elevated Card Style */
.toast-container .ngx-toastr {
    position: relative;
    overflow: hidden;
    margin: 0 0 12px;
    padding: 16px 20px 16px 52px;
    width: 360px;
    border-radius: 12px;
    background-color: #ffffff !important;
    background-position: 16px center;
    background-repeat: no-repeat;
    background-size: 24px;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #00707e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 112, 126, 0.06);
    color: #1e293b;
    font-family: inherit;
    transition: all 0.22s ease-in-out;
    pointer-events: auto;
}

.toast-container .ngx-toastr:hover {
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 112, 126, 0.1);
    transform: translateY(-2px);
    cursor: pointer;
}

/* Toast Title & Message Typography */
.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 4px;
    line-height: 1.3;
}
.toast-message {
    word-wrap: break-word;
    font-weight: 500;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.4;
}
.toast-message a,
.toast-message label {
    color: #00707e;
}
.toast-message a:hover {
    color: #005b67;
    text-decoration: underline;
}

/* Close Button */
.toast-close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease;
    opacity: 0.8;
}
.toast-close-button:hover,
.toast-close-button:focus {
    color: #1e293b;
    opacity: 1;
    outline: none;
}

/* RTL Adjustments for Arabic */
[dir="rtl"] .toast-container .ngx-toastr,
html[dir="rtl"] .toast-container .ngx-toastr,
body[dir="rtl"] .toast-container .ngx-toastr,
body.rtl .toast-container .ngx-toastr {
    padding: 16px 52px 16px 20px;
    background-position: calc(100% - 16px) center;
    text-align: right;
    border-left: 1px solid #e2e8f0;
    border-right: 5px solid #00707e;
}

[dir="rtl"] .toast-close-button,
html[dir="rtl"] .toast-close-button,
body[dir="rtl"] .toast-close-button,
body.rtl .toast-close-button {
    left: 12px;
    right: auto;
}

/* Specific Toast Variant Styles with Custom Crisp SVG Icons */

/* 1. Success Toast */
.toast-success {
    border-left-color: #00707e !important;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%2300707e' d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z'/%3E%3C/svg%3E") !important;
}
[dir="rtl"] .toast-success,
html[dir="rtl"] .toast-success,
body[dir="rtl"] .toast-success,
body.rtl .toast-success {
    border-right-color: #00707e !important;
}
.toast-success .toast-title {
    color: #00707e;
}

/* 2. Error Toast */
.toast-error {
    border-left-color: #e11d48 !important;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23e11d48' d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z'/%3E%3C/svg%3E") !important;
}
[dir="rtl"] .toast-error,
html[dir="rtl"] .toast-error,
body[dir="rtl"] .toast-error,
body.rtl .toast-error {
    border-right-color: #e11d48 !important;
}
.toast-error .toast-title {
    color: #e11d48;
}

/* 3. Info Toast */
.toast-info {
    border-left-color: #0284c7 !important;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%230284c7' d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V240h-24c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v120h24c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-144a32 32 0 1 1 0-64 32 32 0 1 1 0 64z'/%3E%3C/svg%3E") !important;
}
[dir="rtl"] .toast-info,
html[dir="rtl"] .toast-info,
body[dir="rtl"] .toast-info,
body.rtl .toast-info {
    border-right-color: #0284c7 !important;
}
.toast-info .toast-title {
    color: #0284c7;
}

/* 4. Warning Toast */
.toast-warning {
    border-left-color: #d97706 !important;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23d97706' d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm-20-128h40v-40h-40v40zm0-80h40V160h-40v144z'/%3E%3C/svg%3E") !important;
}
[dir="rtl"] .toast-warning,
html[dir="rtl"] .toast-warning,
body[dir="rtl"] .toast-warning,
body.rtl .toast-warning {
    border-right-color: #d97706 !important;
}
.toast-warning .toast-title {
    color: #d97706;
}

/* Progress bar styling */
.toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background-color: rgba(0, 112, 126, 0.4);
    border-radius: 0 0 12px 12px;
}
.toast-error .toast-progress {
    background-color: rgba(225, 29, 72, 0.4);
}
.toast-info .toast-progress {
    background-color: rgba(2, 132, 199, 0.4);
}
.toast-warning .toast-progress {
    background-color: rgba(217, 119, 6, 0.4);
}

/* Responsive adjustments */
@media all and (max-width: 480px) {
    .toast-container .ngx-toastr {
        width: 90vw;
        margin-inline: auto;
    }
}
