/**
 * Toast Notification System Styles
 */

/* Toast container - Centered */
#lilac-toast-container {
    position: fixed;
    z-index: 999999;
    max-width: 500px;
    width: 90%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    direction: rtl;
    text-align: center;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

/* Position variants */
#lilac-toast-container.top-right {
    z-index: 100000;
    top: 20px;
    right: 20px;
}

#lilac-toast-container.top-left {
    top: 20px;
    left: 20px;
}

#lilac-toast-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

#lilac-toast-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Individual toast */
.lilac-toast {
    margin: 10px auto;
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #f8f9fa;
    border-top: 4px solid #2c3e50;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    position: relative;
    padding: 20px 25px;
    text-align: center;
    direction: rtl;
    font-size: 16px;
    line-height: 1.6;
}

.lilac-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Toast types */
.lilac-toast.success {
    border-top-color: #2ecc71;
    background: #e8f8f0;
}

.lilac-toast.error {
    border-top-color: #e74c3c;
    background: #fdeded;
}

.lilac-toast.warning {
    border-top-color: #f39c12;
    background: #fef9e7;
}

.lilac-toast.info {
    border-top-color: #3498db;
    background: #e8f4fc;
}

/* Header and body */
.toast-header {
    padding: 0 0 8px 0;
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    border: none;
    background: none;
}

.lilac-toast.success .toast-header {
    background-color: rgba(40, 167, 69, 0.1);
}

.lilac-toast.error .toast-header {
    background-color: rgba(220, 53, 69, 0.1);
}

.lilac-toast.warning .toast-header {
    background-color: rgba(255, 193, 7, 0.1);
}

.lilac-toast.info .toast-header {
    background-color: rgba(23, 162, 184, 0.1);
}

.toast-body {
    padding: 0;
    margin: 0;
    color: #34495e;
    font-size: 14px;
    line-height: 1.5;
    text-align: right;
}

/* Close button - less prominent, positioned on side */
.toast-close, .lilac-toast-close {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.1);
    border: none;
    font-size: 12px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    padding: 0;
    line-height: 1;
}

.toast-close:hover, .lilac-toast-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}

.toast-close:hover {
    color: #333;
}

/* Progress bar for autodismiss */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0,0,0,0.1);
    width: 0%;
    transition: width linear;
}

.lilac-toast.success .toast-progress {
    background-color: #28a745;
}

.lilac-toast.error .toast-progress {
    background-color: #dc3545;
}

.lilac-toast.warning .toast-progress {
    background-color: #ffc107;
}

.lilac-toast.info .toast-progress {
    background-color: #17a2b8;
}

/* RTL support */
.rtl #lilac-toast-container.top-right {
    left: 20px;
    right: auto;
}

.rtl #lilac-toast-container.top-left {
    right: 20px;
    left: auto;
}

.rtl #lilac-toast-container.bottom-right {
    left: 20px;
    right: auto;
}

.rtl #lilac-toast-container.bottom-left {
    right: 20px;
    left: auto;
}

.rtl .lilac-toast {
    border-left: none;
    border-right: 4px solid #ccc;
}

.rtl .lilac-toast.success {
    border-right-color: #28a745;
}

.rtl .lilac-toast.error {
    border-right-color: #dc3545;
}

.rtl .lilac-toast.warning {
    border-right-color: #ffc107;
}

.rtl .lilac-toast.info {
    border-right-color: #17a2b8;
}

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