/* United We Rise - Search System Styles */

/* ========================================
   SEARCH CONTAINER
======================================== */

.search-container {
    position: fixed;
    top: 6.5vh; /* Below top bar */
    left: 3vw; /* After sidebar */
    width: calc(50vw - 80px); /* Half screen width minus sidebar and padding */
    height: calc(50vh - 10px); /* Half screen height */
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vh;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 8px 8px 0 0;
}

.search-filters {
    display: flex;
    gap: 1rem;
}

.search-filters label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* ========================================
   PANEL SYSTEM
======================================== */

.info-panel, .detail-panel {
    position: fixed;
    top: 65px;
    width: 300px;
    background: #f0f4f8;
    border: 1px solid #ccc;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 99;
    transition: left 0.3s ease;
}

.detail-panel {
    z-index: 100;
}

[data-offset="1"] { left: 3vw; }
[data-offset="2"] { left: 370px; }
.sidebar.expanded ~ [data-offset="1"] { left: 10vw; }
.sidebar.expanded ~ [data-offset="2"] { left: 510px; }

.panel-header {
    display: flex;
    justify-content: space-between;
    background: #ccc;
    padding: 0.5rem;
    font-weight: bold;
}

.panel-body {
    padding: 1rem;
}

/* ========================================
   CIVIC ORGANIZING SYSTEM
======================================== */

.civic-organizing-container {
    position: fixed;
    top: 6vh;
    left: 3.5vw;
    right: 26%;
    height: calc(100vh - 6vh);
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 15;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-sizing: border-box;
}

.civic-organizing-container.sidebar-expanded {
    left: 10.5vw;
}

.organizing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vh;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 8px 8px 0 0;
}

.organizing-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Form Styles for Petitions and Events */
.civic-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group .help-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Event Browser Styles */
.event-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.event-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.event-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.petition-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.petition-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Progress Bar Styles */
.progress-bar {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #4b5c09, #6b7c19);
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .civic-organizing-container {
        top: 10vh;
        left: 2vw;
        width: 96vw;
        height: 85vh;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .event-filters {
        flex-direction: column;
        align-items: stretch;
    }
}