/*
 * Beautiful Clean Toastr CSS - Elegant & Minimal Design
 * Fixed design with proper placement and clean icons
 */

/* Import modern font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* CSS Variables for consistent theming - Solid backgrounds */
:root {
    --toastr-success: #10b981;
    --toastr-success-dark: #059669;
    --toastr-error: #ef4444;
    --toastr-error-dark: #dc2626;
    --toastr-info: #3b82f6;
    --toastr-info-dark: #1d4ed8;
    --toastr-warning: #f59e0b;
    --toastr-warning-dark: #d97706;
    --toastr-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --toastr-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Toast Title */
.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.4;
    color: #fff;
}

/* Toast Message */
.toast-message {
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -ms-word-wrap: break-word;
    word-wrap: break-word;
    color: rgba(255, 255, 255, 0.95);
}

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

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

/* Close Button - Clean and Simple */
.toast-close-button {
    position: absolute;
    right: 12px;
    top: 12px;
    float: none;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-text-shadow: none;
    text-shadow: none;
    opacity: 1;
}

.toast-close-button::before {
    content: '×';
    font-size: 14px;
    line-height: 1;
}

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

.rtl .toast-close-button {
    left: 12px;
    right: auto;
}

button.toast-close-button {
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    -webkit-appearance: none;
}

/* Container Positioning */
.toast-top-center {
    top: 20px;
    right: 0;
    width: 100%;
}

.toast-bottom-center {
    bottom: 20px;
    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: 20px;
    left: 20px;
}

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

.toast-bottom-right {
    right: 20px;
    bottom: 20px;
}

.toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

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

#toast-container * {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Individual Toast Styling - Clean and Simple */
#toast-container > div {
    position: relative;
    pointer-events: auto;
    overflow: hidden;
    margin: 0 0 8px;
    padding: 14px 16px;
    width: 320px;
    min-height: 48px;
    border-radius: 8px;
    box-shadow: var(--toastr-shadow);
    color: #fff !important;
    opacity: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    transition: all 0.3s ease;
    background-repeat: no-repeat !important;
    background-size: 0 !important;
    background-position: 0 0 !important;
    background-image: none !important;
}

#toast-container > div.rtl {
    direction: rtl;
    padding: 14px 16px;
}

#toast-container > div:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: var(--toastr-shadow-hover);
    cursor: pointer;
}

/* Toast Animation */
@keyframes toastr-fade-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#toast-container > div {
    animation: toastr-fade-in 0.3s ease-out;
}

/* Toast Types with Solid Backgrounds */
#toast-container > .toast-success {
    background-color: var(--toastr-success) !important;
    background-image: none !important;
    border-left: 4px solid var(--toastr-success-dark);
    opacity: 1 !important;
}

#toast-container > .toast-error {
    background-color: var(--toastr-error) !important;
    background-image: none !important;
    border-left: 4px solid var(--toastr-error-dark);
    opacity: 1 !important;
}

#toast-container > .toast-info {
    background-color: var(--toastr-info) !important;
    background-image: none !important;
    border-left: 4px solid var(--toastr-info-dark);
    opacity: 1 !important;
}

#toast-container > .toast-warning {
    background-color: var(--toastr-warning) !important;
    background-image: none !important;
    border-left: 4px solid var(--toastr-warning-dark);
    opacity: 1 !important;
}

/* Center alignment */
#toast-container.toast-bottom-center > div,
#toast-container.toast-top-center > div {
    width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Full width toasts */
#toast-container.toast-bottom-full-width > div,
#toast-container.toast-top-full-width > div {
    width: 96%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 6px;
}

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

/* Responsive Design */
@media all and (max-width: 480px) {
    #toast-container > div {
        padding: 12px 14px;
        width: calc(100vw - 32px);
        max-width: 320px;
        margin-left: 16px;
        margin-right: 16px;
    }
    
    .toast-close-button {
        right: 10px;
        top: 10px;
        width: 18px;
        height: 18px;
    }
    
    .toast-close-button.rtl {
        left: 10px;
        right: auto;
    }
    
    .toast-title {
        font-size: 14px;
    }
    
    .toast-message {
        font-size: 12px;
    }
}

@media all and (min-width: 481px) and (max-width: 768px) {
    #toast-container > div {
        padding: 14px 16px;
        width: calc(100vw - 40px);
        max-width: 360px;
    }
}

/* RTL Support */
[dir="rtl"] #toast-container > div {
    padding: 14px 16px;
    border-left: none;
    border-right: 4px solid;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #toast-container > div {
        animation: none;
        transition: opacity 0.2s ease;
    }
    
    #toast-container > div:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    #toast-container > div {
        border-width: 2px;
        border-left-width: 6px;
    }
    
    .toast-close-button {
        background: rgba(255, 255, 255, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
}

/* Remove all background images and icons */
#toast-container > div,
#toast-container > .toast-info,
#toast-container > .toast-error,
#toast-container > .toast-success,
#toast-container > .toast-warning {
    background-image: none !important;
}

/* Legacy classes for compatibility - Solid backgrounds */
.toast {
    background-color: #030303 !important;
    opacity: 1 !important;
}

.toast-success {
    background-color: var(--toastr-success) !important;
    background-image: none !important;
    opacity: 1 !important;
}

.toast-error {
    background-color: var(--toastr-error) !important;
    background-image: none !important;
    opacity: 1 !important;
}

.toast-info {
    background-color: var(--toastr-info) !important;
    background-image: none !important;
    opacity: 1 !important;
}

.toast-warning {
    background-color: var(--toastr-warning) !important;
    background-image: none !important;
    opacity: 1 !important;
}

/* Additional overrides for solid backgrounds */
#toast-container div, 
#toast-container .toast,
#toast-container .toast-success,
#toast-container .toast-error,
#toast-container .toast-info,
#toast-container .toast-warning {
    background-image: none !important;
    opacity: 1 !important;
    -webkit-opacity: 1 !important;
    -moz-opacity: 1 !important;
    filter: alpha(opacity=100) !important;
}

/* Ensure text is always readable */
#toast-container .toast-title,
#toast-container .toast-message {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* RTL Support for solid backgrounds */
[dir="rtl"] #toast-container > .toast-success {
    border-left: none;
    border-right: 4px solid var(--toastr-success-dark);
}

[dir="rtl"] #toast-container > .toast-error {
    border-left: none;
    border-right: 4px solid var(--toastr-error-dark);
}

[dir="rtl"] #toast-container > .toast-info {
    border-left: none;
    border-right: 4px solid var(--toastr-info-dark);
}

[dir="rtl"] #toast-container > .toast-warning {
    border-left: none;
    border-right: 4px solid var(--toastr-warning-dark);
}