/* Search container */
.search {
    position: relative;
    cursor: pointer;
}

/* Toggle button */
.search-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.search-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 🟢 Default state (Inactive) */
.search-dropdown {
    /* ✅ Set to fixed (or absolute) by default */
    position: fixed;

    /* Positioning for fixed/absolute */
    top: 80px; /* Adjust this to match your header height */
    right: 20px;

    width: 300px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 12px;

    /* Visibility animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, position 0s;
    z-index: 1000;
}

/* 🔵 Active state (When clicked) */
.search-dropdown.active {
    /* ✅ Changes to relative when active */
    position: relative;

    /* Reset fixed/absolute positioning properties since it's now in the document flow */
    top: auto;
    right: auto;

    /* Adjust layout for relative positioning */
    width: 100%; /* Or keep 300px depending on your layout */
    margin-top: 10px; /* Adds space from the toggle button */

    /* Show it */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/*  When active, show it */
.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Search form */
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #4caf50;
}

.search-submit {
    padding: 10px 14px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-submit:hover {
    background: #388e3c;
}