/* Import Inter Font to match Figma */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.table-container {
    font-family: 'Inter', sans-serif;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    margin: 40px auto;
    width: 789px; /* FIXED WIDTH FROM FIGMA */
    background-color: #ffffff;
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: #ffffff;
}

.table-header h2 {
    margin: 0;
    font-size: 18px; /* Figma Title Size */
    color: #101828;
    font-weight: 700;
}

/* Search Wrapper and Input - Matched to Figma Frame 15 */
.search-wrapper {
    position: relative;
    width: 162px; /* Fixed width from Figma */
    height: 40px;
}

#districtSearch {
    width: 100%;
    height: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    background-color: #F2F4F7; /* Gray/100 from Figma */
    font-size: 14px;
    color: #667085;
    outline: none;
    box-sizing: border-box;
}

/* Small arrow icon inside search box */
.search-wrapper::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-color: #344054;
    clip-path: polygon(100% 0%, 0% 0%, 50% 100%); /* Draws the down arrow */
    pointer-events: none;
}

/* Table Design */
.constituency-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid #D0D5DD;
    table-layout: fixed;
}

/* Figma Frame 69 Headers */
.constituency-table th {
    background-color: #F9FAFB; /* Gray/50 tint */
    color: #475467; /* Gray/600 text */
    padding: 12px 24px;
    font-size: 16px; /* 103 x 48 Hug Frame size */
    font-weight: 500;
    border: 1px solid #D0D5DD;
    text-align: center;
}

/* Table Data Cells - Matched to Text sm/Regular */
.constituency-table td {
    padding: 10px 24px;
    border: 1px solid #D0D5DD;
    text-align: center;
    font-size: 14px; /* Text sm size */
    color: #101828; /* Gray/900 */
    line-height: 20px;
}

/* Merged District Cell */
.district-cell {
    background-color: #ffffff !important;
    font-weight: 500;
    color: #101828;
    vertical-align: middle;
}

/* Party Name - Bold logic */
.party-bold {
    font-weight: 700;
    color: #101828;
}

/* Row Hover */
.constituency-table tr:hover td {
    background-color: #F9FAFB;
}