@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ===== Style sheet ===== */
*{
    font-family: 'Poppins', sans-serif;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root{
    /* ===== Colors ===== */
    --body-color: #EEEEEE;
    --sidebar-color:  #053B50;
    --primary-color: #64CCC5;
    --secondary-color: #DDD;
    --text-color: #FFF;

    /* ===== Transition ===== */
    --trans-00: all 0.2s ease;
    --trans-01: all 0.3s ease;
    --trans-02: all 0.4s ease;
    --trans-03: all 0.5s ease;
}

body{
    height: 100vh;
    background-color: var(--body-color);
}

/* ===== Sidebar styling starts here ===== */

.sidebar .text{
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--trans-02);
    white-space: nowrap;
    opacity: 1;
}

.sidebar header{
    position: relative;
}

.sidebar .image{
    min-width: 60px;
    display: flex;
    align-items: center;
}

header .image-text .header-text{
    display: flex;
    flex-direction: column;
}

.header-text .name{
    font-weight: 600;
}

.header-text .profession{
    margin-top: -2px;
    font-weight: 300;
    font-size: x-small;
}



.sidebar header .toggle{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    top: 50%;
    right: -25px;
    width: 25px;
    height: 25px;
    background-color: var(--primary-color);
    color: var(--text-color);
    transition: (-50%);

}

.sidebar li{
    height: 50px;
    margin-top: 10px;
    list-style: none;
    display: flex;
    align-items: center;
}

.sidebar li .icon{
    font-size: 20px;
    min-width: 60px;
}

.sidebar .menu-bar{
    height: calc(100% -50px);
    display: flex;
    flex-direction: column;
    margin-top: 20%;
    justify-content: space-between;
}

.sidebar li .icon,
.sidebar li .text{
    color: var(--text-color);
    transition: var(--trans-02);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar li a{
    display: flex;
    text-decoration: none;
    height: 100%;
    width: 100%;
    align-items: center;
    transition: var(--trans-03);
}

.sidebar li a:hover{
    background-color: var(--primary-color);
}

.sidebar li a:hover .icon,
.sidebar li a:hover .text{
    color: var(--sidebar-color);
}

.sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    padding: 10px 14px;
    background-color: var(--sidebar-color);
    transition: var(--trans-03);
}

.sidebar .image-text img{
    width: 55px;
    border-radius: 6px;
}

.buttom-content{
    position: relative;
    bottom: -180px;
}

.sidebar header .image-text{
    display: flex;
    align-items: center;
}

.sidebar.close{
    width: 100px;
}

.sidebar.close .text{
    opacity: 0;
}

/* ===== styling of main contents starts here ===== */
.main-container{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: absolute;
    width: calc(100% - 284px);
    left: 270px;
    min-height: 100vh;
    padding: 10 10px;
    transition: var(--trans-03);
}

.main-container.active{
    width: calc(100% - 120px);
    left: 110px;
}

.main-header{
    display: flex;
    width: 100%;
    height: 60px;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 7px -4px rgba( 0, 0, 0, 0.2);
    padding: 10px 10px;

}

.user-img-container{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100px;
}

.user-img{
    display: flex;
    justify-content: flex-end;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    
}

.user-img img{
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search{
    width: 400px;
    margin: 0 10px;
}

.search label{
    position: relative;
    width: 100%;
}

.search label input{
    width: 100%;
    height: 40px;
    font-size: 14px;
    font-weight: 200;
    border-radius: 40px;
    padding: 5px 20px;
    padding-left: 35px;
    outline: none;
    border: 1px solid var(--secondary-color);
}

.search label i{
    position: absolute;
    top: 0;
    left: 10px;
    font-size: 1.2rem;
}

.welcome{
    margin: 20px;

}
/* ========== box info starts here ================ */
.card-box{
    margin-top: 50px;
    position: relative;
    width: 100%;
    display: grid;
    padding: 12px;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 30px;
}

.card{
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    background-color: var(--primary-color);
    padding: 30px;
    box-shadow: 0 6px 7px -4px rgba( 0, 0, 0, 0.2);
}

.numbers{
    position: relative;
    color: var(--text-color);
}

.iconbox{
    font-size: 1.5rem;
    color: var(--text-color);
}

.card-box .card:hover{
    background-color: var(--sidebar-color);
}

/* ====================== chart contents starts here ============================= */

.charts{
    display: grid;
    position: relative;
    padding: 4px;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 60px;
    margin-bottom: 20px;
}

.charts-card{
    background-color: var(--secondary-color);
    margin-top: 10px;
    padding: 25px;
    box-sizing: border-box;
    -webkit-column-break-inside: avoid;
    border-radius: 5px;
    box-shadow: 0 6px 7px -4px rgba( 0, 0, 0, 0.2);
}

.chart-title{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

#bar-chart{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
    width: 90%;
}

#pie-charts{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 20px;
    width: 90%;
}

/* ========== create elction section ============== */
.create-election{
    display: flex;
    justify-content: center;
    background-size: contain;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 4px;
    margin-top: 12px;
}

.create-election form{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 50px 60px 70px;
    box-shadow: 0 6px 7px -4px rgba( 0, 0, 0, 0.2);
    background-color: var(--secondary-color);
    max-width: 450px;
    border-radius: 16px;
    position: relative;
}


.create-election-info input{
    width: 100%;
    background-color: var(--body-color);
    border: none;
    margin-bottom: 6px;
    color: var(--sidebar-color);
    outline: none;
    padding: 18px 15px;
}

.form-group{
    /* background-color: crimson; */
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

textarea{
    width: 100%;
    resize: none;
    border: none;
    padding: 18px 15px;
}

.create-election-info button{
    display: flex;
    justify-content: center;
    text-decoration: none;
    flex-basis: 48%;
    padding: 0.5rem;
    align-items: center;
    background-color: var(--sidebar-color);
    color: var(--body-color);
    height: 90px;
    border-radius: 20px;
    border: none;
    width: 100%;
    font-size: 13px;
    cursor: pointer;
    transition: var(--trans-00);
}

/* ============ footer styles ==================== */
footer{
    background-color: var(--sidebar-color);
    display: flex;
    padding: 4px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80px;
    border-radius: 4px 1px;
}

footer p{
    color: var(--text-color);
}

footer p a{
    color: var(--primary-color);
    outline: none;
    text-decoration: none;
}

.footer-icon{
    display: flex;
    color: var(--text-color);
    font-size: 30px;
}

.footer-icon i{
    color: var(--text-color);
}

/* ================= responsiveness starts here =============== */
@media only screen and (min-width: 220px) and (max-width: 900px){
    .charts{
        grid-template-columns: repeat(1, 1fr);
    }
    .card-box{
        grid-template-columns: repeat(1, 1fr);
    }
    footer p{
        font-size: 12px;
    }
}
