/* Search Bar Block Frontend Styles */
.wp-block-crates-search-bar {
    width: 100%;
    max-width: 32rem; /* max-w-2xl - better proportions matching React spacing */
    margin: 0 auto 3.5rem auto; /* mx-auto with increased bottom margin to prevent overlap */
}

.crates-search-bar__form {
    position: relative;
}

.crates-search-bar__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.crates-search-bar__input {
    width: 100%;
    background-color: #0F2922; /* bg-[#0F2922] */
    border: 1px solid #1A2A25; /* border border-[#1A2A25] */
    color: #ffffff; /* text-white */
    padding: 0.75rem 1rem 0.75rem 3rem; /* py-3 px-4 pl-12 */
    border-radius: 9999px; /* rounded-full */
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.2s ease-in-out; /* transition-all */
}

.crates-search-bar__input:focus {
    outline: none; /* focus:outline-none */
    box-shadow: 0 0 0 2px #F39A76; /* focus:ring-2 focus:ring-[#F39A76] */
    border-color: transparent; /* focus:border-transparent */
}

.crates-search-bar__input::placeholder {
    color: #9CA3AF; /* text-gray-400 */
}

.crates-search-bar__icon {
    position: absolute;
    left: 1rem; /* left-0 pl-4 */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #9CA3AF; /* text-gray-400 */
    width: 1.25rem; /* h-5 w-5 */
    height: 1.25rem;
}

.crates-search-bar__button {
    position: absolute;
    right: 0.125rem; /* right-2 */
    top: 0.375rem; /* inset-y-1.5 */
    bottom: 0.375rem;
    background-color: #163832; /* bg-[#163832] */
    color: #ffffff; /* text-white */
    padding: 0.375rem 1rem; /* px-4 py-1.5 */
    border-radius: 9999px; /* rounded-full */
    border: none;
    cursor: pointer;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    transition: background-color 0.2s ease-in-out; /* transition-colors */
}

.crates-search-bar__button:hover {
    background-color: #1D4640; /* hover:bg-[#1D4640] */
}

.crates-search-bar__button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #F39A76;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .wp-block-crates-search-bar {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    .crates-search-bar__input {
        padding-right: 5rem; /* More space for button on mobile */
    }

    .crates-search-bar__button {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }
}