/* ============================================================
   Shared Filter Accordion Styles
   Include in any list page that uses the accordion filter.
   Usage in Django template:
       {% block css %}
           <link rel="stylesheet" href="{% static 'css/filter_accordion.css' %}">
       {% endblock %}
   ============================================================ */

.filter-accordion {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.filter-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #45816B 0%, #6aab91 100%);
    border: none;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.filter-toggle-btn:hover {
    background: linear-gradient(135deg, #3a6e5a 0%, #57927c 100%);
}

.filter-toggle-btn .btn-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.filter-toggle-btn .badge-pills {
    display: flex;
    gap: 0.4rem;
}

.filter-toggle-btn .pill {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.filter-toggle-btn .chevron {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    opacity: 0.85;
}

.filter-toggle-btn.collapsed .chevron {
    transform: rotate(-90deg);
}

.filter-body {
    background: #fff;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

/* Two-column grid with vertical divider */
.filter-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0 1.5rem;
    align-items: start;
}

.filter-col {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.75rem;
}

.filter-col .field-wrap {
    flex: 1 1 160px;
    min-width: 0;
}

.filter-col .field-wrap.half {
    flex: 1 1 120px;
}

.filter-col .form-group {
    margin-bottom: 0.75rem !important;
}

.vertical-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, #dee2e6 15%, #dee2e6 85%, transparent);
    align-self: stretch;
    margin-top: 2rem;
}

/* Section labels */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.badge-permit   { background: #e8f0fe; color: #3b5bdb; }
.badge-vehicle  { background: #fff3bf; color: #e67700; }
.badge-visitor  { background: #d3f9d8; color: #2f9e44; }
.badge-employee { background: #f3d9fa; color: #862e9c; }
.badge-sticker  { background: #ffeaf0; color: #c2255c; }
.badge-host     { background: #e8f8f5; color: #0e7c61; }

/* Bottom row (third section + actions) */
.filter-bottom {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e9ecef;
}

.filter-bottom .bottom-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.75rem;
    flex: 1;
}

.filter-bottom .bottom-fields .field-wrap {
    flex: 1 1 180px;
    min-width: 0;
}

.filter-bottom .bottom-fields .form-group {
    margin-bottom: 0 !important;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-bottom: 1px;
}