/**********   GENERAL ****************/

* {
    box-sizing: border-box;
    font-family: 'Trirong', serif;
    letter-spacing: .5px;
}

ul {
    list-style: none;
}

h3 {
    padding-left: 20px;
    font-size: 1rem;
    margin-bottom: 5px;
}

p {
    margin: 0;
}

/**********   COLORS ****************/
:root {
    --white-color: rgb(253, 249, 249);
    --light-white: rgb(241, 240, 240);
    --light-grey: rgb(216, 216, 216);
    --grey-color: rgb(136, 133, 133);
    --dark-blue: #062D36;
    --light-blue: #107B93;
    --green-color: #3cba9f;
    --red-color: rgb(184, 45, 45);
}

/**********   GRID LAYOUT ****************/

body {
    background-color: var(--white-color);
    display: grid;
    grid-template-columns: 70px 1fr;
    grid-template-rows: 70px 1fr;
    grid-template-areas: 
    "header header"
    "nav main";
}



nav {
    grid-area: nav;
    background-color: var(--dark-blue);
}

main {
    grid-area: main;
}


/**********   images and icons sizes ****************/

.bell,
#user img,
.nav-icon {
    height: 30px;
    width: 30px;
}

/**********   FLEX DISPLAYS AND CENTER ITEMS ****************/

header,
#user,
#search_bar h2,
#search_bar div,
.channel_stats,
#notifications_wrapper,
.notification_output,
.notification_container,
#message_success {
    display: flex;
    align-items: center;
}

/**********   header ****************/
header {
    grid-area: header;
    background-color: var(--light-blue);
}

#app_name{
    margin: 0 auto;  
}

#app_name span {
    font-family: 'Cabin Condensed', sans-serif;
    font-size: 1.5rem;
    color: var(--dark-blue);
    margin-right: -5px;
}

#app_name,
#user p {
    color: var(--white-color);
}


#notifications_wrapper {
    margin-right: 10px;
    position: relative;
}

#user {
    padding-right: 20px;
}

#user img {
    border-radius: 50%;
    margin-right: 15px;   
}

#user p {
    font-size: 1.1rem;
}

#user * {
    display: none;
}

/**********   BELL  ****************/

@keyframes ring {
    
    20% {
        transform: rotate(25deg);
    }
    
    40% {
        transform: rotate(-25deg);
    }

    60% {
        transform: rotate(25deg);
    }
    
    80% {
        transform: rotate(-25deg);
    }
}

.bell:hover {
    animation: ring .75s linear;
}

/**********   NOTIFICATIONS  ****************/

    /**** Green dot for notifications *****/

    #green_dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: var(--green-color);
        position: absolute;
        top: 0;
        left: 20px;
    }

    

.notification_output {
    position: absolute;
    top: 55px;
    right: 20px;
    z-index: 10;
    flex-direction: column;
    display: none;
}

.notification_container {
    width: 270px;
    padding: 5px 7px;
    justify-content: space-between;
    border:1px solid var(--light-grey);
}

.notification_message {
    font-size: .78rem;
    font-weight: 600;
    margin-right: auto;
    margin-left: 5px;
}

.notification_container::before {
    content: " ";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--green-color);
}

.close_notification {
    font-size: 1rem;
    padding: 0 7.5px 0 5px;
    border-radius: 5px;
    transition: background-color .6s;
}

.close_notification:hover {
    font-weight: 600;
    color: var(--white-color);
    background-color: var(--red-color);
    cursor: pointer;
}

.close_notification,
.notification_output {
    background-color: var(--white-color);
}

/**********  NAV ****************/

nav ul {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

nav li {
    width: 100%;
    margin: 10px 0;
    text-align: center;
}

.nav-icon {
    padding-top: 5px;
}

nav li:hover {
    border-left: 3px solid var(--light-blue);
}


/**********  SEARCH BAR ****************/

#search_bar {
    display: flex;
    height: 70px;
}

#search_bar h2 {
    font-size: 1.2em;
    font-weight: 200;
    height: 100%;
    padding: 0 20px;
    margin: 0;
    background-color: var(--white-color);
}

#search_input {
    height: 40px;
    width: 40%;
    border-radius: 5px;
    border: 2px solid var(--light-grey);
    margin-left: auto;
    position: relative;
}

#search_bar div {
    width: 90%;
    height: 100%;
    border-bottom: 2px solid var(--light-grey);
    border-left: 2px solid var(--light-grey);
    text-align: right;
    padding-right: 20px;
    background-color: var(--light-white);
    position: relative;
}

#magnifier-image {
    height: 15px;
    width: 15px;
    position: absolute;
    right: 30px;
}

#search_input::placeholder {
    padding-left: 4%;
}

/**********  ALERTS ****************/

#alerts {
    margin: 15px 20px;
    padding: 10px;
    background-color: var(--light-blue);
    border-radius: 5px;
    color: var(--light-white);
    position: relative;
    display: none;
}

#alerts div {
    max-width: 95%;
}

#alerts span {
    font-weight: 600;
    margin-right: 10px;
}

#alerts p {
    margin: 0;
    font-size: .78rem;
}

#close_alert {
    position: absolute;
    padding: 6px;
    right: 6px;
    top: 0;
}

#close_alert:hover {
    cursor: pointer;
}

/**********   Gutters ****************/

.separation_top {

    margin-top: 30px;
    margin-bottom: 15px;
    border-top: 1px solid var(--light-grey);
}

/**********  POINTS CHART ****************/

        /*  TIMEFRAME MENU FOR CHART */

        #timeframe_menu,
        #area_overview div  {
            display: flex;
        }

        #area_overview h3 {
            margin-right: auto;
        }

        #timeframe_menu {
            margin-right: 20px;
            flex-basis: 30%;
            justify-content: space-between;
        }

        #timeframe_menu button {
            display: inline-block;
            margin-top: 2.5px;
            margin-left: 10px;
            padding: 0 10px;
            border-radius: 15px;
            font-size: .9rem;
            background-color: var(--white-color);
            border: none;
        }

        #timeframe_menu button:hover,
        #timeframe_menu .selected_timeframe {
            background-color: var(--green-color);
            color: var(--white-color);
            cursor: default;
        }

#canvas_container {
    height: 45vh;
}

#area-chart-h,
#area-chart-d,
#area-chart-w,
#area-chart-m,
#donut_chart,
#bar_chart {
    max-width: 100%;
    padding: 10px 20px 0;
}

/**********  SOCIAL MEDIA INFO ****************/

#social_stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 0 10px;
    padding-bottom: 16px;
}

.channel_stats {
    height: 90px;
    flex-basis: 30%;
    background-color: var(--light-white);
    border-radius: 5px;
    border: 2px solid var(--light-grey);
}

#social_stats h3 {
    flex-basis: 100%;
    padding-left: 10px;
    margin-bottom: 20px;
}

.media_icon_1 {
    height: 30px;
    width: 30px;
    margin-top: 8px;
}

.media_icon_2 {
    height: 25px;
    width: 25px;
    margin-top: 13px;
}

.icon_wrapper {
    height: 50px;
    width: 50px;
    background-color: var(--light-blue);
    border-radius: 50%;
    margin: 0 10px;
    text-align: center;
}

.icon_wrapper path{
    fill: #FFF;
}

.media_wrapper h4 {
    font-size: .9rem;
    color: var(--light-blue);
}

.media_wrapper h4,
.member_email,
.member_name,
.date_joined,
.activity_done,
.activity_time {
    margin: 0;
}

.media_wrapper p {
    margin-top: -10px;
    font-size: 1.1rem;
}

/**********  NEW MEMBERS ****************/

.member {
    display: flex;
    margin: 15px 0;
    border-bottom: 2px solid var(--light-white);
    padding-bottom: 10px;
    margin-left: 20px;
}

.member:first-child {
    padding-top: 15px;
}

.member:last-child {
    border: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.member img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    margin-right: 15px;
    
}

.member_data_wrapper {
    flex-basis: 65%;
    margin-right: auto;
}

.member_email {
    color: var(--light-blue);
    margin-top: -5px;
    font-size: .9rem;
}

.date_joined{
    flex-basis: 20%;
    color: var(--grey-color);
    font-size: .85rem;
}


/**********  MEMBER ACTIVITY ****************/

.activity_time {
    margin-top: -5px;
    font-size: .9rem;
    color: var(--grey-color);
}

#output_activity .member_data_wrapper {
    flex-basis: 75%;
}

.activity_details {
    font-size: 1.8rem;
    flex-basis: 5%;
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 10px;
    color: var(--light-blue);
}

.activity_details:hover {
    cursor: pointer;
}

/**********  MESSAGE TO USER ****************/


#message_form {
    display: flex;
    flex-direction: column;
}

#message_user input,
#message_user textarea,
#message_user button {
    margin: 8.5px 20px;
    border-radius: 5px;
    padding: 7px;
    
}

.grey_border {
    border: 1px solid var(--light-grey);
}

#message_user textarea {
    height: 120px;
}

#send_message,
#save_settings,
#cancel_settings {
    background-color: var(--light-blue);
    color: var(--white-color);
    border: none;
    padding: 7px;
    letter-spacing: 1px;
}

#message_form label {
    margin-left: 20px;
    color: var(--red-color);
    font-size: .9rem;
    display: none;
}

    /* ERROR VALIDATION STYLE */

    .error {
        border: 2px solid var(--red-color);
    }

    /* SUCCESS VALIDATION STYLE */

    #message_success {
        margin: 0 20px;
        height: 40px;
        border-radius: 5px;
        background-color: rgba(29, 161, 36, 0.829);
        color: var(--white-color);
    }

    #message_success p {
        margin: auto;
    }    

    /*  Autocomplete Styling */

    .background {
        background-color: var(--white-color);
        color: var(--dark-blue);
        border: 1px solid var(--light-blue);
        border-radius: 5px;
    }

    .background li {
        padding-left: 15px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .background li:hover {
        background-color: var(--light-white);
    }

    div[role="status"] {
        width: 0;
        height: 0;
        display: none;
    }

/**********  SETTINGS SECTION ****************/

#settings {
    display: flex;
    flex-direction: column;
}

.switch_container,
#timezone,
#settings_buttons {
    margin: 5px 20px;
}

#timezone {
    margin-top: 15px;
    margin-bottom: 15px;
}

.switch_container {
    display: flex;
    align-items: center;
    width: 50%;
    margin-bottom: 20px;
}

.switch_container p {
    margin-right: auto;
    font-size: .9rem;
}

#cancel_settings {
    background-color: var(--grey-color);
}

#settings_buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

#save_settings,
#cancel_settings {
    border-radius: 5px;
    flex-basis: 47.5%;
}


/**********  TOOGGLE SWITCH ****************/

.switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 34px;
}

.switch input {
    display:none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
  }

  input:checked + .slider {
    background-color: var(--light-blue);
  }

  input:focus + .slider {
    box-shadow: 0 0 1px var(--light-blue);
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(45px);
    -ms-transform: translateX(45px);
    transform: translateX(45px);
  }

  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }

.status_switch {
    display: inline-block;
    margin-left: 9px;
    margin-top: 5px;
    font-size: .9rem;
    color: var(--white-color);
    opacity: 1;
}


/***********    MEDIA QUERIES  ***************/

@media (min-width: 768px) {

    #app_name{
        margin-left: 70px;  
    }

    #user * {
        display: block;
    }

    #user {
        padding: 5px 20px 5px 10px;
        border-left: 1px solid var(--light-grey);
    }

    .bell {
        margin-right: 10px;
    }

    #green_dot {
        right: 220px;
    }

    .media_icon_1 {
        height: 35px;
        width: 35px;
        margin-top: 12px;
    }

    .media_icon_2 {
        width: 30px;
        height: 30px;
        margin-top: 18px;
    }

    .media_wrapper h4{
        font-size: 1rem;
    }

    .media_wrapper p {
        font-size: 1.8rem;
    }

    .channel_stats {
        height: 100px;
    }

    .icon_wrapper {
        width: 60px;
        height: 60px;
        margin-right: 10%;
        margin-left: 7%;
    }
}

@media (min-width: 1024px) {


    #app_name {
        font-size: 2.3rem;
    }

    #user p {
        font-size: 1.2rem;
    }

    #green_dot {
        right: 231px;
    }

    #magnifier-image {
        right: 3%;
    }

    /*** Chart menu timeframe  ***/

    #timeframe_menu button {
        margin-left: 0;
    }

    /** CHARTS***/

    #donut_chart,
    #bar_chart {
        max-height: 400px;
    }

    #donut_overview,
    #bar_overview {
        width: 50%;
        padding-bottom: 20px;
    }

    #charts_wrapper {
        display: flex;
    }

    #bar_overview {
        order: 1;
    }

    #donut_overview {
        order: 2;
        border-left: 1px solid var(--light-grey);
        margin-bottom: 0;
    }

    #bar_chart {
        margin-top: 20px;
    }

    /****  SOCIAL STATS ***/

    #social_stats {
        margin-top: 0;
    }

    .channel_stats {
        flex-basis: 27%;
        height: 110px;
    }

    .media_icon_1 {
        height: 40px;
        width: 40px;
        margin-top: 14px;
    }

    .media_icon_2 {
        width: 35px;
        height: 35px;
        margin-top: 20px;
    }

    .media_wrapper h4{
        font-size: 1.1rem;
    }

    .media_wrapper p {
        font-size: 2rem;
    }

    .icon_wrapper {
        width: 70px;
        height: 70px;
        margin-right: 10%;
        margin-left: 7%;
    }

    /* MEMBERS SECTIONS */

    #members_sections_wrapper {
        display: flex;
        flex-wrap: wrap;
    }

    #members_sections_wrapper section {
        flex-basis: 50%;
        padding-right: 20px;
    }

    #members_sections_wrapper section:nth-child(even) {
        border-left: 1px solid var(--light-grey);
    }

    #members_sections_wrapper section:nth-child(n+3) {
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 10px;
        padding-bottom: 20px;

    }

    #members_sections_wrapper section:nth-child(-n+2) {
        margin-bottom: 0;
        padding-bottom: 30px;
    }
}


  