/* ============================================================
   SEARCH BAR WRAPPER
   ------------------------------------------------------------
   This holds:
   - tag bubbles
   - the text input
   - the dropdown
   All inside one flexible bar.
============================================================ */
#searchWrapper {
    position: relative;
    width: 100%;
    min-height: 45px;
    background: #121213;
    border: 2px solid #353538;
    border-radius: 6px;
    padding: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   TAG BUBBLES INSIDE THE SEARCH BAR
   ------------------------------------------------------------
   These appear when the user selects a tag.
   They sit inside the search bar like Discord/Gmail chips.
============================================================ */


/* "x" button inside the bubble */
.tag-bubble span {
    cursor: pointer;
    font-weight: bold;
}

/* ============================================================
   SEARCH INPUT FIELD
   ------------------------------------------------------------
   This stays usable even when bubbles are present.
============================================================ */
#blogSearch {
    flex: 1;
    min-width: 120px;
    border: none;
    background: transparent;
    color: #eee;
    font-size: 16px;
    padding: 6px;
    outline: none;
}

/* ============================================================
   DROPDOWN LIST OF TAG SUGGESTIONS
   ------------------------------------------------------------
   Appears under the search bar.
============================================================ */
#tagDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #121213;
    border: 1px solid #353538;
    border-radius: 6px;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
}

.tag-option {
    padding: 10px;
    cursor: pointer;
    color: #17b92c;
}

.tag-option:hover {
    background-color: #121213;
    color: #40ff59;
}

/* ============================================================
   POST FADE + COLLAPSE ANIMATION
   ------------------------------------------------------------
   - .hiding = fade + shrink
   - .hidden = fully removed from layout
============================================================ */
.blog-post {
    opacity: 1;
    max-height: 500px;
    overflow: hidden;
    transform: scale(1);
    transition: opacity 0.35s ease, max-height 0.35s ease, transform 0.35s ease;
}

.blog-post.hiding {
    opacity: 0;
    max-height: 0;
    transform: scale(0.98);
}

.blog-post.hidden {
    display: none;
}
#search-input {
    width: 260px;
    padding: 10px 12px;
    font-family: "Press Start 2P", monospace;
    font-size: 12px;
    background-color: #121213;
    color: #40ff59;
    border: 3px solid #40ff59;
    outline: none;

    background-image:
        repeating-linear-gradient(
            to bottom,
            rgba(64,255,89,0.05) 0px,
            rgba(64,255,89,0.05) 1px,
            rgba(0,0,0,0.15) 2px
        );

    filter: contrast(1.15) brightness(1.05);

    /* FIX: keep clickable */
    pointer-events: auto;
    position: relative;
    z-index: 9999;
}
