/* Stari blok za #messages-container > div (oznaka .message-success/.message-text,
   nigdje se više ne koristi) je obrisan: pravilo s ID-em bilo je jače od
   .alert-message, pa je nametalo padding 20px 24px i ✕ je sjeo na tekst. */

@keyframes slideDown {
    from { 
        transform: translateY(-100px) scale(0.8); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

@keyframes slideUp {
    to { 
        transform: translateY(-100px); 
        opacity: 0; 
    }
}

/* ========== ALERT MESSAGES (messages.html partial) ========== */
.messages-fixed {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 480px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-message {
    position: relative;
    padding: 16px 44px 20px 20px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    animation: msgSlideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    color: white;
    text-align: center;
}

.alert-success { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.alert-error   { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.alert-warning { background: linear-gradient(135deg, #f39c12, #e67e22); }
.alert-info    { background: linear-gradient(135deg, #3498db, #2980b9); }

.alert-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.alert-text {
    flex: 1;
    line-height: 1.4;
}

.alert-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255,255,255,0.25);
    border: none;
    color: white;
    font-size: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}

.alert-close:hover {
    background: rgba(255,255,255,0.45);
}

.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(255,255,255,0.35);
    border-radius: 0 0 14px 14px;
    transform-origin: left;
    animation: msgProgress 5s linear forwards;
}

@keyframes msgSlideDown {
    from { transform: translateY(-60px) scale(0.9); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes msgSlideUp {
    to { transform: translateY(-60px) scale(0.9); opacity: 0; }
}

@keyframes msgProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@media (max-width: 768px) {
    .messages-fixed {
        width: 50% !important;
        max-width: 50% !important;
    }
}

/* Mobitel: pola ekrana je ~190px, pa se "Molimo odaberite: KROASAN" lomio u
   tri reda. Tablet zadržava 50% (gornji blok). */
@media (max-width: 480px) {
    .messages-fixed {
        width: 92% !important;
        max-width: 92% !important;
    }
}
