/* Base Alert Styles */
.elpuru_alert_desapp {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: 50%;
    max-width: 600px;
    min-width: 280px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 1;
}

/* Alert Color Variants */
.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Fade Effect */
.elpuru_alert_desapp.fade {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(-10px);
}

/* Dismissible Button */
.alert-dismissible .close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    padding: 0;
    background: transparent;
    border: none;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s;
}

.alert-dismissible .close:hover {
    opacity: 0.8;
}

/* Tablet Styles */
@media (max-width: 992px) {
    .elpuru_alert_desapp {
        width: 65%;
        font-size: 15px;
        padding: 14px 18px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .elpuru_alert_desapp {
        width: 80%;
        font-size: 14px;
        padding: 12px 16px;
        top: 15px;
    }
}

/* Mobile Portrait */
@media (max-width: 576px) {
    .elpuru_alert_desapp {
        width: 90%;
        max-width: none;
        font-size: 14px;
        padding: 12px 40px 12px 16px;
        top: 10px;
        left: 5%;
        right: 5%;
        transform: none;
        border-radius: 6px;
    }

    .alert-dismissible .close {
        right: 10px;
        font-size: 20px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .elpuru_alert_desapp {
        width: 95%;
        font-size: 13px;
        padding: 10px 35px 10px 12px;
        left: 2.5%;
        right: 2.5%;
    }

    .alert-dismissible .close {
        right: 8px;
        font-size: 18px;
    }
}

/* Animation for Multiple Alerts */
.elpuru_alert_desapp:nth-child(2) {
    top: 80px;
}

.elpuru_alert_desapp:nth-child(3) {
    top: 150px;
}

@media (max-width: 576px) {
    .elpuru_alert_desapp:nth-child(2) {
        top: 70px;
    }

    .elpuru_alert_desapp:nth-child(3) {
        top: 130px;
    }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    .elpuru_alert_desapp {
        border-width: 2px;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    .elpuru_alert_desapp {
        transition: none;
    }

    .elpuru_alert_desapp.fade {
        transition: none;
    }
}