/* Message Components Styles */

/* Common styles for all message containers */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    direction: rtl;
}

/* Common alert styles */
.message-alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Session messages */
.session-messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    direction: rtl;
}

.session-alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.session-alert.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-right: 4px solid #28a745;
}

.session-alert.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-right: 4px solid #dc3545;
}

.session-alert.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-right: 4px solid #ffc107;
}

.session-alert.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-right: 4px solid #17a2b8;
}

/* Validation errors */
.validation-errors-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    direction: rtl;
}

.validation-alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-right: 4px solid #dc3545;
}

/* Livewire errors */
.livewire-errors-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    direction: rtl;
}

.livewire-alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-right: 4px solid #dc3545;
}

/* Cart errors */
.cart-errors-container {
    direction: rtl;
}

.cart-error-alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-right: 4px solid #dc3545;
}

/* Success messages */
.success-message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    direction: rtl;
}

.success-alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-right: 4px solid #28a745;
}

/* Alert icon styles */
.alert-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.alert-icon svg {
    color: inherit;
}

/* Alert content styles */
.alert-content {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.alert-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    display: block;
}

.alert-message {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(0, 0, 0, 0.8);
    padding-right: 0;
    margin: 0;
}

.alert-message li {
    margin-bottom: 4px;
    padding-right: 0;
}

.alert-message li:last-child {
    margin-bottom: 0;
}

/* Close button styles */
.btn-close {
    background: none;
    border: none;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.5);
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.btn-close:hover {
    color: rgba(0, 0, 0, 0.8);
}

/* Input error styles */
.input-error-container {
    margin-top: 6px;
}

.input-error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 8px 12px;
    animation: fadeInUp 0.3s ease-out;
}

.error-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.2);
}

.error-icon svg {
    color: #dc3545;
}

.error-text {
    font-size: 13px;
    color: #721c24;
    font-weight: 500;
    line-height: 1.3;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade out animation */
.session-alert.fade-out,
.validation-alert.fade-out,
.livewire-alert.fade-out,
.success-alert.fade-out,
.cart-error-alert.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .session-messages-container,
    .validation-errors-container,
    .livewire-errors-container,
    .success-message-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .session-alert,
    .validation-alert,
    .livewire-alert,
    .success-alert,
    .cart-error-alert {
        margin-bottom: 8px;
    }

    .alert-icon {
        width: 35px;
        height: 35px;
    }

    .alert-icon svg {
        width: 18px;
        height: 18px;
    }

    .alert-title {
        font-size: 13px;
    }

    .alert-message {
        font-size: 12px;
    }

    .input-error-message {
        padding: 6px 10px;
    }

    .error-icon {
        width: 18px;
        height: 18px;
    }

    .error-icon svg {
        width: 14px;
        height: 14px;
    }

    .error-text {
        font-size: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .session-alert,
    .validation-alert,
    .livewire-alert,
    .success-alert,
    .cart-error-alert {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }

    .alert-message {
        color: rgba(255, 255, 255, 0.8);
    }

    .btn-close {
        color: rgba(255, 255, 255, 0.5);
    }

    .btn-close:hover {
        color: rgba(255, 255, 255, 0.8);
    }

    .input-error-message {
        background: rgba(220, 53, 69, 0.1);
        border-color: rgba(220, 53, 69, 0.3);
    }

    .error-text {
        color: #ff6b6b;
    }

    .error-icon {
        background: rgba(220, 53, 69, 0.3);
    }

    .error-icon svg {
        color: #ff6b6b;
    }
}

/* Color variations for different message types */
.alert-success .alert-title {
    color: #155724;
}

.alert-danger .alert-title {
    color: #721c24;
}

.alert-warning .alert-title {
    color: #856404;
}

.alert-info .alert-title {
    color: #0c5460;
} 