/* ============================================
   Design-Matched Styling for Welcome Page
   Based on bdnews24.com design image
   ============================================ */

/* ---- Page Background ---- */
.welcome-page,
.page-wrapper {
    background-color: #dde8ed !important;
}

body.welcome-body {
    background-color: #dde8ed !important;
}

/* ---- Navbar Styling ---- */
.navbar.glass-navbar {
    background: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: none !important;
    padding: 12px 0;
}

.navbar .navbar-brand-text {
    color: #e63946 !important;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar .btn-home-outline {
    color: #e63946 !important;
    background-color: transparent;
    border: 1.5px solid #e63946;
    border-radius: 6px;
    padding: 6px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.navbar .btn-home-outline:hover {
    background-color: #e63946;
    color: #ffffff !important;
}

.navbar .btn-home-outline .icon {
    color: #e63946;
    width: 18px;
    height: 18px;
}

.navbar .btn-home-outline:hover .icon {
    color: #ffffff;
}

/* ---- Filter Section Card ---- */
.filter-card {
    /* background: linear-gradient(180deg, #e3eff7 0%, #f8f9eb 100%); */
    background-image: url(../.././static/filter-bg.svg);
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    border: 1px solid #d8e2e9;
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
}

.filter-card .card-header {
    background-color: transparent !important;
    border-bottom: 1px solid #e8eff4;
    padding: 20px 24px;
}
.filter-card .card-header .d-flex.align-items-center.justify-content-center{
    width: 100%;
}

.filter-card .card-header .card-title {
    color: #000 !important;
    font-size: 1.55rem;
    font-weight: 600;
}

.filter-card .card-header .filter-icon {
    background-color: #f0f5f9;
    border-radius: 8px;
    margin-right: 8px;
}
 .filter-card .card-header .filter-icon i{
    font-size: 24px;
 }

.filter-card .card-body {
    background-color: transparent;
    padding: 24px;
}

/* ---- Form Controls ---- */
.filter-card .form-label {
    color: #000;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.filter-card .form-select {
    background-color: #ffffff;
    border: 1px solid #d8e2e9;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #4a5568;
    box-shadow: none !important;
    transition: border-color 0.2s ease;
}

.filter-card .form-select:focus {
    border-color: #e63946;
    outline: none;
}

.filter-card .form-select:disabled {
    background-color: #f5f8fa;
    color: #9ca9b5;
}

/* ---- Primary Button (Red) ---- */
.btn-primary-red {
    background-color: #e63946 !important;
    border-color: #e63946 !important;
    color: #ffffff !important;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.btn-primary-red:hover {
    background-color: #d62839 !important;
    border-color: #d62839 !important;
}

.btn-primary-red .icon {
    width: 18px;
    height: 18px;
}

/* ---- Main Chart Card ---- */
/* .chart-card {
    background: linear-gradient(180deg, #e3eff7 0%, #f8f9eb 100%);
    border: none;
    border-radius: 12px;
    box-shadow: none;
} */
 .chart-card{background: unset; background-image: url(../.././static/home-bg.svg);width: 100%; background-size: cover; background-position: center; position: relative;}


.chart-card .card-body {
    padding: 24px;
}

/* ---- Page Title ---- */
#page-title {
    color: #000;
    font-size: 1.85rem;
    font-weight: 700!important;
}

/* ---- Legend Card ---- */
.chart-card .card.border-0.shadow-sm {
    background-color: #ffffff;
    border: 1px solid #e0e8ed !important;
    border-radius: 12px;
    overflow: hidden;
}

.chart-card .card.border-0.shadow-sm .card-body {
    padding: 0;
}

/* Legend rows */
#legend>div.d-flex {
    padding: 8px 16px;
    margin-bottom: 0 !important;
    border-bottom: none;
    font-size: 1rem;
}

#legend>div.d-flex:last-of-type {
    border-bottom: none;
}

/* Colored dot - smaller size */
#legend .rounded-circle {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0;
}

/* Party name */
#legend .d-flex.align-items-center {
    font-size: 1rem;
    color: #1a2b3c;
}

/* Seat count badge - smaller */
#legend .badge {
    background-color: #ffffff !important;
    color: #1a2b3c !important;
    border: 1px solid #d0d8e0;
    border-radius: 6px;
    padding: 4px 12px !important;
    font-size: 1rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* Footer text - results published */
#legend .text-center.border-top {
    padding: 16px;
    background-color: transparent;
    font-size: 1rem;
    color: #1a2b3c;
    border-top: 1px solid #d8e2e9 !important;
    margin-top: 8px;
}

#legend .text-center.border-top .text-danger {
    color: #e63946 !important;
    font-weight: 700;
}

/* Small note below footer */
#legend .text-center.border-top small {
    display: block;
    margin-top: 4px;
    color: #6b7d8a;
    font-size: 0.75rem;
}

/* ---- Party Cards Section ---- */
.party-cards-section .h2 {
    color: #1a2b3c;
    font-weight: 600;
}

/* ---- Progress Bar Styles (Chart-related - kept as is) ---- */
.progress-bar-wrapper {
    position: relative;
}

.progress-segment {
    height: 100%;
    font-size: 12px;
    white-space: nowrap;
}

.majority-line {
    position: absolute;
    top: -8px;
    width: 2px;
    height: 60px;
    background: rgba(0, 0, 0, 0.35);
}

.tooltip-js {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 9999;
}

/* Custom CSS for the Referendum (Gonovote) Section */

.gonovote-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
    /* Replicating the background gradient and top line from the image */
    /* background: linear-gradient(90deg, #e3eff7 0%, #f8f9eb 100%); */
    border-top: 1px solid #d1d1d1;
}

.gonovote-section .label {
    margin-right: 10px;
    color: #000;
}

.gonovote-section .vote-box {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 10px;
    /* Smooth rounded corners */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    /* Subtle depth */
    border: 1px solid #f0f0f0;
    height: 52px;
    padding: 0 18px;
    /* Fixed height for consistency */
}

.gonovote-section .option {
    padding: 0 15px;
    color: #000;
    font-weight: 600;
    /* Overriding fw-bold for the specific 'Yes/No' text */
}

.gonovote-section .divider {
    width: 1px;
    height: 30px;
    background-color: #e0e0e0;
}

.gonovote-section .count {
    padding: 0 20px;
    color: #000;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Adjustments for the Bootstrap classes you included */
.gonovote-section.fs-3 {
    font-size: 1.75rem !important;
}

/* Election Home CSS */
.chart-card{background: unset; background-image: url(../.././static/home-bg.svg);width: 100%; background-size: cover; background-position: center; position: relative;}

/* Go back Button CSS */
.constituency-page-bg-wrapper{background-image: url(../.././static/filter-bg.svg);width: 100%; background-size: cover; background-position: center; position: relative;}
.constituency-page-bg-wrapper h1{font-size: 28px!important;color: #000!important;}
.constituency-page .card-header{position: relative;}
.constituency-page .constituency-back-btn{ position: absolute!important; right: 30px; background: transparent!important; box-shadow: unset!important; border: unset!important; }
.constituency-page .constituency-back-btn i { color: #e63946 !important; margin-right: 5px; font-size: 18px; }
.constituency-page .form-label { color: #000!important; font-size: 0.9rem!important; font-weight: 700!important; }
.constituency-page .btn.constituency-back-btn:hover{ background: transparent!important; border: unset!important; }
.glass-navbar .navbar-brand-image{ height: unset!important; width: 210px!important; }

/* Home Page Title and Sponsor Logo Section */
.title-logo-wrap {
    min-height: 48px;
}

.title-logo-title {
    text-align: center;
    max-width: calc(100% - 140px);
    margin-left: auto;
    margin-right: auto;
}

.title-logo-brand {
    position: absolute;
    right: 0;
    top: 0;
    text-align: center;
}

.title-logo-brand .powered-by {
    font-size: 10px;
    line-height: 1;
    margin-bottom: 4px;
    margin-right: 40px;
    color: #6c757d;
}

@media (max-width: 575.98px) {
    .title-logo-title {
        max-width: 100%;
    }

    .title-logo-brand {
        position: static;
        margin-top: 6px;
    }
    .title-logo-brand .powered-by {
        margin-right: unset;
    }
}
/* Home Page Title and Sponsor Logo Section End */

@media (max-width: 767.98px) {
    .constituency-page .constituency-header {
        flex-direction: column;
        align-items: center !important;
        gap: 0.5rem;
    }

    .constituency-page .constituency-header > div {
        width: 100%;
    }

    .constituency-page .constituency-back-btn {
        position: static !important;
        right: auto !important;
        top: auto !important;
        width: auto !important;
        display: inline-flex !important;
        justify-content: flex-start !important;
        align-self: center;
        margin: 0.25rem 0 0;
    }
}