* { 
    margin: 0; 
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7874bc;
    --secondary-color: #4d4c72;
    --neutral-light: lightgrey;
    --neutral-dark: grey;
    --active-color: #84cc8c;
}

body {
    font-family: 'Quicksand', sans-serif;
    width: 100%;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
        "header"
        "nav"
        "main";
}

main {
    grid-area: main;
    display: grid;
}

.widget-container-full, .widget-container-half {
    width: 85vw;
    display: flex;
    margin: 10px auto;
    align-items: center;
    flex-direction: row;
    justify-content: center
}

section {
    border-bottom: solid rgba(0, 0, 0, 0.193) .5px;
    padding: 10px;
}

.social-stats-container,
.form-area,
#timezone,
.form-field {
    border: 1px solid var(--neutral-light);
}

/*  =================================================
                        HEADER
    =================================================   */

header {
    grid-area: header;
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    height: 80px;
    padding: 15px;
}

h1 {
    font-weight: 100;
    font-size: 1.2rem;
    margin-right: auto;
}

h1 strong {
    font-weight: 700;
}

#header-img {
    height: 40px;
    border-radius: 50%;
    margin: 0px 10px;
}

#header-name {
    font-size: .9rem;
    font-weight: 500;
}

/*  =================================================
                    MAIN HEADER AND TAB
    =================================================   */

.main-header {
    display: flex;
    flex-direction: row;
    margin-bottom: 10px;
}

.dashboard {
    text-align: center;
    width: 40%;
}

h2 {
    margin: 15px 5px;
    font-weight: 600;
    font-size: 1.1rem;
}

.tab {
    background-color: whitesmoke;
    border-bottom: solid var(--neutral-light) 1px;
    border-left: solid var(--neutral-light) 1px;
    width: 60%;
}

.section-header {
    text-transform: uppercase;
    margin: 10px;
    font-size: 1rem;
}

.profile-img {
    border-radius: 50%;
    width: 70px;
}


/*  =================================================
                ALERT & NOTIFICATIONS
    =================================================   */

.alert-banner,
.notifications-banner {
    border-radius: 5px;
    background-color: var(--primary-color);
    width: 90%;
    margin: 10px auto;
    color: white;
    padding: 10px 20px;
    font-size: .8rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.notifications-banner {
    flex-direction: row;
    padding: 10px;
}

.notifications-text {
    width: 100%;
}

.notif-ind-text {
    width: 80%;
}

.notification-div {
    margin-top: 20px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.dismiss-notification {
    font-size: .6rem;
}

.hide {
    display: none;
}
    
#bell-icon {
    fill: white;
    margin-top: 10px;
    height: 20px;
    transition: all .5s ease-in-out;
    display: inline-block;
    position: relative;
}

#bell-icon:hover {
    transform: scale(1.3);
    fill: yellow;
}

#bell-div {
    color: white;
    text-decoration: none;
    position: relative;
    display: inline-block;
    height: 40px;
    width: 40px;
    border-right: solid white .5px;

}

.badge {
    position: absolute;
    top: 7px;
    right: 19px;
    padding: 5px;
    border-radius: 50%;
    background: var(--active-color);
}

/*  =================================================
                MEMBERS & RECENT SECTIONS
    =================================================   */

.members-container a,
.recent-container a {
    text-decoration: none;
    color: var(--primary-color);
}

.members-container:not(:last-child),
.recent-container:not(:last-child) {
    border-bottom: .5px solid var(--neutral-light);
}

.members-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px 15px;
}

.members-text,
.recent-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-weight: 500;
    margin-top: 10px;
    font-size: 1rem;
}

.recent-container {
    display: flex;
    text-align: center;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px 15px;
}

.recent-arrow {
    display: none;
}

/*  =================================================
                    NAVIGATION
    =================================================   */

nav {
    grid-area: nav;
    background-color: var(--secondary-color);
    height: 60px;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    position: sticky;
    top: 0;
}

nav svg {
    height: 30px;
    fill: white;
}

/*  =================================================
                        TRAFFIC
    =================================================   */

.traffic {
    padding-top: 0px;
}

.traffic-header ul {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    list-style-type: none;
    width: 80%;
    margin: 10px auto;
}

.traffic-nav-links {
    font-size: .8rem;
    font-weight: 500;
    margin: 5px 0px;
    border-radius: 50%;
    padding: 10px;
}

.active {
    background-color: var(--active-color);
    color: white;
}

/*  =================================================
                    SOCIAL STATS
    =================================================   */

.social-stats-container {
    background-color: whitesmoke;
    padding: 10px;
    margin: 10px auto;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

.social-svg {
    height: 70px;
    fill: white;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.social-stats-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: bold;
}

.social-stats-text p:first-of-type {
    color: var(--primary-color);
}

.stats-number {
    font-size: 2.3rem;
    color: var(--neutral-dark);
}

/*  =================================================
                    MESSAGE FORM
    =================================================   */

.form-field,
.form-area,
#timezone {
    background-color: whitesmoke;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    margin: 10px 0;
    color: grey;
}

form {
    display: flex;
    flex-direction: column;
}

#send {
    width: 100%;
    margin: 0 auto;
}

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

.toggle-switch-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.toggles,
.toggle-switch-container {
    width: 300px;
}

.toggle-div strong {
    margin: 10px;
}

#switch-2-label {
    margin-right: 42px;
}

.toggle-div {
    font-size: .9rem;
}

.button-primary {
    background-color: var(--primary-color);
    border-radius: 5px;
    color: white;
    padding: 15px;
    text-transform: uppercase;
    border-style: none;
}

.button-disabled {
    background-color: var(--neutral-dark);
    border-radius: 5px;
    color: white;
    padding: 15px;
    text-transform: uppercase;
    border-style: none;
}

.settings-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.settings-buttons, #send {
    margin: 15px 0px 10px;
}

.settings-buttons button {
    width: 49%;
}

#settings-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.switch-light input ~ span > span + span {
    display: none;
}

.switch-light input:checked ~ span > span + span {
    display: inline-block;
}

#switch-text,
#switch-text-2 {
    color: white;
    bottom: -4px;
    font-size: .75rem;
    left: 4px;
}

/*  =================================================
                AUTOCOMPLETE STYLING
    =================================================   */

    .autocomplete {
        position: relative;
        display: inline-block;
    }

    input[type=text] {
        background-color: #f1f1f1;
        width: 100%;
    }

    .autocomplete-items {
        position: absolute;
        border: 1px solid #d4d4d4;
        border-bottom: none;
        border-top: none;
        z-index: 99;
        /*position the autocomplete items to be the same width as the container:*/
        top: 100%;
        left: 0;
        right: 0;
      }
      .autocomplete-items div {
        padding: 10px;
        cursor: pointer;
        background-color: #fff;
        border-bottom: 1px solid #d4d4d4;
      }
      .autocomplete-items div:hover {
        /*when hovering an item:*/
        background-color: #e9e9e9;
      }
      .autocomplete-active {
        /*when navigating through the items using the arrow keys:*/
        background-color: DodgerBlue !important;
        color: #ffffff;
      }

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

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: 75px 1fr;
        grid-template-areas:
        "header header"
        "nav main";
    }
    
    main {
        grid-template-columns: 50%;
    }

    .main-header,
    .alert,
    .alert-banner,
    .notification,
    .notifications-banner,
    .traffic,
    .social-stats,
    .new-members,
    .recent-activity,
    .message-user,
    .settings {
        grid-column: 1 / span 2;
    }

    .dashboard {
        width: 30%;
    }

    .tab {
        width: 70%;
    }

    header {
        padding: 15px 45px;
        position: sticky;
        top: 0;
    }

    h1 {
        font-size: 1.5rem;
    }

    #header-img {
        height: 50px;
    }

    #header-name {
        font-size: 1.1rem;
    }

    .alert-banner,
    .notifications-banner {
        margin: 20px auto;
        font-size: 1rem;
    }

    .notification-div {
        margin: 20px auto;
        width: 80%;
    }

    .traffic-header ul {
        width: 90%;
        justify-content: flex-end;
    }

    .traffic-nav-links {
        font-size: 1.1rem;
    }

    .daily-traffic {
        grid-column: 1 / span 1;
    }

    .mobile-users {
        grid-column: 2 / span 1;
        border-left: solid rgba(0, 0, 0, 0.193) .5px;
    }

    .widget-container-half {
        width: 35vw;
    }

    nav {
        height: calc(100vh - 80px);
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        position: sticky;
        top: 80px;
    }

    .social-stats-row {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }

    .social-stats-container {
        width: 30%;
        padding: 10px;
        justify-content: space-around;
        margin: 10px 0px;
    }

    .stats-number {
        font-size: 2.1rem;
    }

    .members-container {
        flex-direction: row;
        justify-content: space-around;
    }

    .recent-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .recent-container-2 {
            display: flex;
            flex-direction: row;
            align-items: center;
    }

    .recent-arrow {
        display: inline-block;
    }

    .profile-img {
        margin-right: 10px;
    }

    .recent-text {
        align-items: flex-start;
        margin-top: 0;
    }
    .members-text {
        flex-direction: column;
        align-items: flex-start;
        margin-top: revert;
        margin-right: auto;
        text-align: left;
        font-size: 1rem;
    }

    .settings-buttons button {
        width: 45%;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .section-header {
        font-size: 1.2rem;
    }

}

@media (min-width: 1024px) {

    .grid-container {
        grid-template-columns: 90px 1fr;
    }

    main {
        grid-template-columns: 50% 50%;
    }

    .dashboard {
        width: 20%;
    }

    .tab {
        width: 80%;
    }

    #traffic-container {
        width: 70vw;
    }

    .traffic-header ul {
        width: 70%;
    }

    .alert-banner,
    .notifications-banner {
        font-size: 1.1rem;
    }

    .notification-div {
        margin: 20px auto;
        width: 60%;
    }


    .recent-activity,
    .settings {
        grid-column: 2 / span 1;
        border-left: solid rgba(0, 0, 0, 0.193) .5px;
    }
    
    .daily-traffic,
    .new-members,
    .message-user {
        grid-column: 1 / span 1;
    }

    #member-name {
        font-size: 1.3rem;
    }

    #message-form,
    #settings-content {
        width: 90%;
        height: 80%;
        justify-content: space-between;
        margin: 0px auto;
    }

    .settings-buttons, 
    #send {
        margin-bottom: 0px;
    }

    .settings-buttons {
        margin-top: 0;
    }

    .members-content,
    .recent-content {
        height: 100%;
    }

    .members-container, 
    .recent-container {
        height: 100px;
    }

    .recent-text {
        text-align: left;
        margin-right: 10px;
    }

    .toggles {
        margin-top: 10px;
    }

    .toggle-div {
        font-size: 1rem;
    }

    .toggle-div strong {
        margin: 20px 10px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section-header {
        font-size: 1.4rem;
        margin-left: 25px;
    }

    .traffic-nav-links {
        font-size: 1.3rem;
    }


}
