/* ============================================================
   Brown County Events Search v1.1
   ============================================================ */

.bc-search-wrap { font-family: inherit; max-width: 100%; }

/* ── Form ── */
.bc-search-form {
    background: #faf5ef;
    border: 1px solid #e0d5c8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.bc-search-dates {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bc-search-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 140px;
}

.bc-search-field--full {
    flex: unset;
    width: 100%;
    margin-bottom: 14px;
}

.bc-search-field label,
.bc-search-field--full > label {
    font-size: 0.85em;
    font-weight: 700;
    color: #3a2a1a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bc-search-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9em;
    color: #8b7a68;
}

.bc-search-field input[type="date"] {
    padding: 8px 10px;
    border: 1px solid #c9b99a;
    border-radius: 5px;
    font-size: 0.93em;
    font-family: inherit;
    background: #fff;
    color: #2a1a0a;
    cursor: pointer;
    width: 100%;
}

.bc-search-field input[type="date"]:focus {
    outline: 2px solid #8b4513;
    outline-offset: 1px;
}

/* ── Category dropdown ── */
.bc-cat-dropdown {
    position: relative;
}

.bc-cat-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 14px;
    background: #fff;
    border: 1px solid #c9b99a;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.93em;
    color: #3a2a1a;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s;
}

.bc-cat-toggle:hover { border-color: #8b4513; }
.bc-cat-toggle[aria-expanded="true"] { border-color: #8b4513; border-radius: 5px 5px 0 0; }

.bc-cat-toggle-label { flex: 1; }
.bc-cat-toggle-icon  { font-size: 0.85em; color: #6b5a48; margin-left: 8px; }

.bc-cat-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #8b4513;
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bc-cat-panel-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 10px;
    max-height: 260px;
    overflow-y: auto;
}

.bc-cat-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 0.9em;
    color: #2a1a0a;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s;
}

.bc-cat-option:hover { background: #faf5ef; }

.bc-cat-option input[type="checkbox"] {
    accent-color: #8b4513;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}

.bc-cat-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-top: 1px solid #e0d5c8;
    background: #faf5ef;
    border-radius: 0 0 6px 6px;
}

.bc-cat-clear-btn {
    font-size: 0.83em;
    color: #8b7a68;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
    text-decoration: underline;
}

.bc-cat-done-btn {
    padding: 5px 16px;
    background: #8b4513;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.87em;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.bc-cat-done-btn:hover { background: #6b3410; }

/* Selected tags below dropdown */
.bc-cat-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.bc-cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #8b4513;
    color: #fff;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.bc-cat-tag-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

.bc-cat-tag-remove:hover { color: #fff; }

/* ── Featured / Free toggles ── */
.bc-search-toggles {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.bc-search-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #d8cfc4;
    border-radius: 20px;
    font-size: 0.9em;
    color: #3a2a1a;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    text-transform: none;
    letter-spacing: 0;
}

.bc-search-pill:hover { border-color: #8b4513; background: #fdf5ed; }

.bc-search-pill input[type="checkbox"] {
    accent-color: #8b4513;
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.bc-search-pill.bc-pill-active {
    background: #8b4513;
    border-color: #8b4513;
    color: #fff;
}

.bc-search-pill--featured {
    align-items: flex-start;
    border-radius: 8px;
    padding: 8px 14px;
}

.bc-search-pill--featured.bc-pill-active { background: #5c2d0a; border-color: #5c2d0a; }

.bc-search-featured-wrap { display: flex; flex-direction: column; gap: 2px; }
.bc-search-featured-title { font-weight: 700; font-size: 0.92em; text-transform: uppercase; letter-spacing: 0.04em; }
.bc-search-featured-note  { font-size: 0.8em; opacity: 0.8; text-transform: none !important; letter-spacing: 0 !important; }

/* ── Actions ── */
.bc-search-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.bc-search-submit {
    padding: 10px 26px;
    background: #8b4513;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.97em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.bc-search-submit:hover    { background: #6b3410; }
.bc-search-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.bc-search-reset {
    padding: 10px 18px;
    background: #f0e4d4;
    color: #5c2d0a;
    border: 1px solid #c9b99a;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
}

.bc-search-reset:hover { background: #e0d0bc; }

/* ── Error ── */
.bc-search-error {
    margin-top: 10px;
    padding: 9px 14px;
    background: #fdf0f0;
    border: 1px solid #e0b0b0;
    border-radius: 4px;
    color: #8b1a1a;
    font-size: 0.9em;
}

/* ── Results ── */
.bc-search-output { margin-top: 8px; }

.bc-search-count {
    font-size: 0.88em;
    color: #6b5a48;
    font-style: italic;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0d5c8;
}

.bc-search-day { margin-bottom: 18px; }

.bc-search-day-header {
    font-weight: 700;
    font-size: 0.97em;
    color: #fff;
    background: #5c2d0a;
    padding: 7px 14px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.bc-search-no-results {
    padding: 20px;
    text-align: center;
    color: #6b5a48;
    font-style: italic;
    background: #faf5ef;
    border: 1px dashed #c9b99a;
    border-radius: 6px;
}

/* ── Mobile ── */
@media (max-width: 520px) {
    .bc-search-form    { padding: 14px; }
    .bc-search-dates   { flex-direction: column; gap: 10px; }
    .bc-cat-panel-inner { grid-template-columns: 1fr; }
    .bc-search-submit,
    .bc-search-reset   { width: 100%; text-align: center; }
    .bc-search-actions { flex-direction: column; align-items: stretch; }
    .bc-search-toggles { flex-direction: column; }
}
