/* Validation Message */
.validation-msg {
    position: absolute;
    bottom: -40px;
    /* Position below the capsule */
    left: 50%;
    transform: translateX(-50%);
    background-color: #fee2e2;
    color: #ef4444;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.1);
    white-space: nowrap;
    z-index: 10;
    animation: slideUpFade 0.3s ease-out;
    border: 1px solid #fecaca;
}

.validation-msg::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #fee2e2 transparent;
}

.validation-msg.hidden {
    display: none;
    opacity: 0;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Ensure search-capsule has relative positioning for absolute child */
.search-capsule {
    position: relative;
}

/* Mobile adjustment */
@media (max-width: 768px) {
    .validation-msg {
        bottom: -50px;
        width: 90%;
        text-align: center;
        white-space: normal;
    }
}