/* ============================================
   CUSTOM TOASTR CSS
   ============================================ */

/* Toast Container */
.toast-container {
    position: fixed;
    z-index: 999999;
    padding: 10px;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
    direction: rtl;
}

/* Position classes */
.toast-top-left {
    top: 20px;
    left: 20px;
}

.toast-top-right {
    top: 20px;
    right: 20px;
}

.toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

.toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Individual Toast */
.toast {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-bottom: 12px;
    position: relative;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    border-right: 4px solid transparent;
    overflow: hidden;
    min-height: 60px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(20px);
}

/* Toast Types */
.toast-success {
    border-right-color: #27ae60;
    background: #f0faf3;
}

.toast-success .toast-title {
    color: #27ae60;
}

.toast-error {
    border-right-color: #e74c3c;
    background: #fdf2f2;
}

.toast-error .toast-title {
    color: #e74c3c;
}

.toast-warning {
    border-right-color: #f39c12;
    background: #fef9f0;
}

.toast-warning .toast-title {
    color: #f39c12;
}

.toast-info {
    border-right-color: #364C9F;
    background: #f0f4ff;
}

.toast-info .toast-title {
    color: #364C9F;
}

/* Toast Title */
.toast-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    font-family: inherit;
}

/* Toast Message */
.toast-message {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    font-family: inherit;
    word-wrap: break-word;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    animation: toastProgress linear forwards;
}

.toast-success .toast-progress {
    background: #27ae60;
}

.toast-error .toast-progress {
    background: #e74c3c;
}

.toast-warning .toast-progress {
    background: #f39c12;
}

.toast-info .toast-progress {
    background: #364C9F;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Toast Close Button */
.toast-close-button {
    position: absolute;
    top: 8px;
    left: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1;
}

.toast-close-button:hover {
    color: #333;
    transform: rotate(90deg);
}

/* RTL Support */
[dir="rtl"] .toast {
    border-left: 4px solid transparent;
    border-right: none;
}

[dir="rtl"] .toast-success {
    border-left-color: #27ae60;
}

[dir="rtl"] .toast-error {
    border-left-color: #e74c3c;
}

[dir="rtl"] .toast-warning {
    border-left-color: #f39c12;
}

[dir="rtl"] .toast-info {
    border-left-color: #364C9F;
}

[dir="rtl"] .toast-close-button {
    left: auto;
    right: 12px;
}

[dir="rtl"] .toast-progress {
    left: auto;
    right: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .toast-container {
        max-width: 90%;
        padding: 6px;
    }
    
    .toast {
        padding: 14px 16px;
        border-radius: 10px;
        min-height: 50px;
    }
    
    .toast-title {
        font-size: 15px;
    }
    
    .toast-message {
        font-size: 13px;
    }
    
    .toast-close-button {
        font-size: 16px;
        top: 6px;
        left: 10px;
    }
    
    [dir="rtl"] .toast-close-button {
        left: auto;
        right: 10px;
    }
    
    .toast-top-left {
        top: 10px;
        left: 10px;
    }
    
    .toast-top-right {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .toast-container {
        max-width: 95%;
        padding: 4px;
    }
    
    .toast {
        padding: 12px 14px;
        border-radius: 8px;
        min-height: 44px;
        margin-bottom: 8px;
    }
    
    .toast-title {
        font-size: 14px;
    }
    
    .toast-message {
        font-size: 12px;
    }
    
    .toast-close-button {
        font-size: 14px;
        top: 5px;
        left: 8px;
    }
    
    [dir="rtl"] .toast-close-button {
        left: auto;
        right: 8px;
    }
}