/* Election Selector Styles */

.election-selector {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.election-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.election-selector-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #1a1a1a;
}

.election-dropdown {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.election-select-wrapper {
    position: relative;
    min-width: 300px;
}

.election-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.election-select:hover {
    border-color: #4a90e2;
}

.election-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.election-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 12px;
}

.election-type-filter {
    display: flex;
    gap: 10px;
}

.type-filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.type-filter-btn:hover {
    border-color: #4a90e2;
    color: #4a90e2;
}

.type-filter-btn.active {
    background: #4a90e2;
    border-color: #4a90e2;
    color: white;
}

.election-info {
    display: flex;
    gap: 30px;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 15px;
}

.election-info-item {
    display: flex;
    flex-direction: column;
}

.election-info-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.election-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.election-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.election-badge.current {
    background: #4CAF50;
    color: white;
}

.election-badge.completed {
    background: #2196F3;
    color: white;
}

.election-badge.upcoming {
    background: #FF9800;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .election-selector-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .election-dropdown {
        width: 100%;
        flex-direction: column;
    }

    .election-select-wrapper {
        width: 100%;
        min-width: unset;
    }

    .election-type-filter {
        width: 100%;
        overflow-x: auto;
    }

    .election-info {
        flex-direction: column;
        gap: 15px;
    }
}

/* Admin Panel Styles */
.admin-panel {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.create-election-btn {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.create-election-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.election-form {
    background: white;
    padding: 20px;
    border-radius: 6px;
    display: none;
}

.election-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background: #357abd;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* Elections List */
.elections-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.election-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.election-card:hover {
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.election-card.selected {
    border-color: #4a90e2;
    background: #f0f7ff;
}

.election-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.election-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.election-card-body {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.election-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.election-date {
    font-size: 13px;
    color: #999;
}

.election-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}
