/* CSS for Rotating Search Placeholder */

/* Ensure the wrapper handles positioning */
.search-wrapper {
    position: relative;
    display: block;
    width: 100%;
    flex: 1;
    /* Ensure it takes available space in flex container */
}

/* The placeholder container overlay */
.rotating-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0.375rem 1rem;
    /* Adjust to match input padding */
    pointer-events: none;
    /* Clicks go through to the input */
    overflow: hidden;
    color: #999;
    /* Placeholder text color */
    font-size: 14px;
    /* Adjust to match input font size */
    z-index: 5;
    white-space: nowrap;
}

/* Hide placeholder when input has value or is focused (optional, based on UX pref) */
/* We will handle visibility via JS classes for better control, 
   but this helps as a default if JS sets a class. */
.search-wrapper.has-content .rotating-placeholder,
.search-wrapper.is-focused .rotating-placeholder {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Individual text items */
.rotating-text-item {
    position: absolute;
    left: 1rem;
    /* Match padding-left */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: opacity, transform;
}

/* Active state for the visible text */
.rotating-text-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Exiting state for the previous text */
.rotating-text-item.exit {
    opacity: 0;
    transform: translateY(-10px);
}

/* Mobile specific adjustments if needed */
/* The parent .mobile-search-form might need relative positioning if we wrap it there */
.mobile-search-form .search-wrapper {
    width: 100%;
}

/* Adjust padding/font for mobile if different */
@media (max-width: 768px) {
    .rotating-placeholder {
        padding-left: 1rem;
        /* Ensure specific alignment */
    }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    .rotating-text-item {
        transition: opacity 0s, transform 0s !important;
        transform: none !important;
    }
}