/* Candidate Modal Styles */
.hc-candidate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hc-candidate-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.hc-candidate-modal {
    background: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Dark Mode Support */
html.dark .hc-candidate-modal {
    background: #1f2937;
    color: #f3f4f6;
}

.hc-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

html.dark .hc-modal-header {
    background: #111827;
    border-color: #374151;
}

.hc-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

html.dark .hc-modal-title {
    color: #f3f4f6;
}

.hc-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 0;
}

.hc-modal-close:hover {
    background: #e5e7eb;
    color: #ef4444;
}

html.dark .hc-modal-close:hover {
    background: #374151;
}

.hc-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Area Selection Buttons */
.hc-area-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.hc-area-btn {
    appearance: none;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    /* Ensure no underline */
    color: inherit;
    /* Inherit color */
}

html.dark .hc-area-btn {
    background: #1f2937;
    border-color: #374151;
}

.hc-area-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hc-area-btn.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1e40af;
}

html.dark .hc-area-btn.active {
    background: #1e3a8a;
    border-color: #60a5fa;
    color: #bfdbfe;
}

.hc-area-name {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Candidate Grid */
.hc-candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.hc-candidate-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    text-align: center;
    padding-bottom: 15px;
}

html.dark .hc-candidate-card {
    background: #111827;
    border-color: #374151;
}

.hc-candidate-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: #3b82f6;
}

.hc-candidate-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f3f4f6;
}

.hc-candidate-info {
    padding: 15px;
}

.hc-candidate-name {
    font-weight: 700;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #111827;
}

html.dark .hc-candidate-name {
    color: #f3f4f6;
}

.hc-candidate-party {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.hc-view-profile-btn {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
}

.hc-view-profile-btn:hover {
    background: #1d4ed8;
    color: white;
}

/* Loading State */
.hc-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.hc-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.hc-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}