﻿/* ========================================
   LEOMIL — ALERT BAR
   Prefijo: alert-bar-
   ======================================== */

.alert-bar-wrapper {
    position: fixed;
    bottom: 80px;
    right: 24px; /* en lugar de left: 50% + transform */
    left: auto;
    transform: none;
    width: 530px;
    max-width: calc(100% - 48px);
    z-index: 9999;
    animation: alert-bar-slidein 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes alert-bar-slidein {
    from {
        opacity: 0;
        transform: translateY(30px); /* sin el translateX(-50%) */
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-bar {
    display: flex;
    align-items: flex-end; /* ancla todo al fondo */
    background: #636363;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: visible;
    position: relative;
    min-height: 72px;
    padding: 0 20px 0 0;
    margin-top: 28px; /* reserva espacio para que el camaleón sobresalga */
}

.alert-bar-img-col {
    flex-shrink: 0;
    width: 80px;
    margin-left: 16px;
    align-self: flex-end;
}

.alert-bar-img {
    display: block;
    width: 80px;
    height: 108px;
    object-fit: contain;
    object-position: bottom;
    margin-bottom: 0;
    margin-top: -28px; /* sale hacia arriba por encima de la barra */
    filter: drop-shadow(0 -4px 10px rgba(0, 0, 0, 0.35));
}

/* Columna 2 — texto */
.alert-bar-text-col {
    flex-grow: 1;
    padding: 16px 16px 16px 20px;
    display: flex;
    align-items: center;
}

.alert-bar-text {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(11px, 1.3vw, 12px);
    font-weight: 500;
    color: #ffffff;
    line-height: 1.45;
    margin: 0;
    max-width: 680px;
    /* truncar si excede los 90 caracteres visualmente */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botón cerrar */
.alert-bar-close {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
    margin-left: 12px;
    font-family: 'Poppins', sans-serif;
}

    .alert-bar-close:hover {
        background: rgba(255, 255, 255, 0.22);
        color: #fff;
    }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .alert-bar-wrapper {
        bottom: 12px;
        width: calc(100% - 24px);
    }

    .alert-bar {
        border-radius: 12px;
        min-height: 64px;
    }

    .alert-bar-img-col {
        width: 60px;
        margin-left: 10px;
    }

    .alert-bar-img {
        width: 60px;
        height: 78px;
    }

    .alert-bar-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .alert-bar-img-col {
        width: 50px;
        margin-left: 8px;
    }

    .alert-bar-img {
        width: 50px;
        height: 66px;
    }

    .alert-bar-text {
        font-size: 12px;
        -webkit-line-clamp: 3;
    }

    .alert-bar-close {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
}
