/**
 * QLK Commerce - Floating Alerts System
 * Reusable floating alert/notification system for the entire plugin
 * 
 * @package    Qlk_Commerce
 * @author     Hector Jaimes <hector.jaimes@quelinka.com>
 */

/* ========================================
   Floating Alert Container
   ======================================== */

.qlk-floating-alert {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    max-width: 500px;
    width: 90%;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.qlk-floating-alert.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ========================================
   Alert Content
   ======================================== */

.qlk-floating-alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.qlk-floating-alert-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.qlk-floating-alert-message {
    flex: 1;
}

/* ========================================
   Close Button (Link Style)
   ======================================== */

.qlk-floating-alert-close {
    /* Reset all button styles */
    all: unset;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Custom styles */
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0;
    margin-left: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-decoration: none;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.qlk-floating-alert-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.qlk-floating-alert-close:focus {
    outline: none;
    opacity: 1;
}

.qlk-floating-alert-close:active {
    transform: scale(0.95);
}

/* ========================================
   Alert Types - Danger/Error
   ======================================== */

.qlk-floating-alert.danger .qlk-floating-alert-content {
    background-color: #EB0578;
    color: #fff;
    border: 2px solid #c20463;
}

.qlk-floating-alert.danger .qlk-floating-alert-close {
    color: #fff;
}

/* ========================================
   Alert Types - Success
   ======================================== */

.qlk-floating-alert.success .qlk-floating-alert-content {
    background-color: #28a745;
    color: #fff;
    border: 2px solid #218838;
}

.qlk-floating-alert.success .qlk-floating-alert-close {
    color: #fff;
}

/* ========================================
   Alert Types - Warning
   ======================================== */

.qlk-floating-alert.warning .qlk-floating-alert-content {
    background-color: #ffc107;
    color: #212529;
    border: 2px solid #d39e00;
}

.qlk-floating-alert.warning .qlk-floating-alert-close {
    color: #212529;
}

/* ========================================
   Alert Types - Info
   ======================================== */

.qlk-floating-alert.info .qlk-floating-alert-content {
    background-color: #17a2b8;
    color: #fff;
    border: 2px solid #138496;
}

.qlk-floating-alert.info .qlk-floating-alert-close {
    color: #fff;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .qlk-floating-alert {
        bottom: 15px;
        width: 95%;
    }
    
    .qlk-floating-alert-content {
        padding: 10px 14px;
        gap: 10px;
        font-size: 13px;
    }
    
    .qlk-floating-alert-icon {
        font-size: 18px;
    }
    
    .qlk-floating-alert-close {
        font-size: 26px;
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .qlk-floating-alert {
        bottom: 10px;
        width: 98%;
    }
    
    .qlk-floating-alert-content {
        padding: 10px 12px;
        gap: 8px;
        font-size: 12px;
    }
}

