/*  general styles start */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h3 {
  text-transform: uppercase;
  font-weight: 900;
}

.even-margin {
  margin-left: 20px;
  margin-right: 20px;
}
  
section {    
  border-bottom: 1px solid #cccccc;
  padding-bottom: 20px;
}

.section-headline {
  margin: 20px 0px 10px 0px;
}

/* general styles end */

.body-grid-container {
  font-family: 'Open Sans', 'Raleway', sans-serif;
  font-size: 14px;
  color: black;
  background-color: white;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto;
  grid-template-areas:
    "header"
    "navigation"
    "main";
}

.header-container {
  grid-area: header;
  background-color: #7477bf;
  color: white;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__sub-container--left {
  width: 35%;
  padding-left: 10px;
  font-size: 17px;
}

.header__sub-container--right {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  width: 65%;
}

.header-image {
  width: 38px;
  height: auto;
  border-radius: 50%;
}

/* bell container and notification */
@keyframes ring {
  0% { transform: rotate(0); }
  1% { transform: rotate(30deg); }
  3% { transform: rotate(-28deg); }
  5% { transform: rotate(34deg); }
  7% { transform: rotate(-32deg); }
  9% { transform: rotate(30deg); }
  11% { transform: rotate(-28deg); }
  13% { transform: rotate(26deg); }
  15% { transform: rotate(-24deg); }
  17% { transform: rotate(22deg); }
  19% { transform: rotate(-20deg); }
  21% { transform: rotate(18deg); }
  23% { transform: rotate(-16deg); }
  25% { transform: rotate(14deg); }
  27% { transform: rotate(-12deg); }
  29% { transform: rotate(10deg); }
  31% { transform: rotate(-8deg); }
  33% { transform: rotate(6deg); }
  35% { transform: rotate(-4deg); }
  37% { transform: rotate(2deg); }
  39% { transform: rotate(-1deg); }
  41% { transform: rotate(1deg); }
  43% { transform: rotate(0); }
  100% { transform: rotate(0); }
}

.header__bell-container {
  display: inline-block;
  width: 25px;
  height: auto;
}

.header__bell-notifications {
  fill: white;
  width: 20px;
  height: 20px;
  position: relative;
}

.header__bell-notifications:hover {
  animation: ring 2s .6s ease-in-out;
  transform-origin: 50% 4px;
}

.header__notifications-circle {
  position: absolute;
  background-color: #90ee90; 
  height: 6px;
  width: 6px;
  border-radius: 50%;
  top: 19px;
  left: 140px;
}
/* bell container and notifications end */

.header__vertical-line {
  border-left: 1px solid rgb(179, 166, 209);
  height: 40px;
}

.navigation-container {
  grid-area: navigation;
  background-color: #4d4c72;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.navigation-container svg {
  fill: white;
  width: 50px;
  height: auto;
  padding: 10px;
}

.main-container {
  grid-area: main;
}

.main__header {
  grid-area: mainHeader;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px;
}

input[type="search"]#searchSite {
  border-radius: 5px;
  font-family: inherit;
  padding: 5px;
  width: 155px;
}

.alert-banner {
  grid-area: alertBanner;
  background-color: #7477bf;
  color: white;
  border-radius: 5px;
  padding: 10px 15px;
  width: 87%;
  margin: 0 auto;
  display: flex;
}

.alert-message {
  flex: 1 1 auto;
}

.alert-banner-close {
  flex: 0 0 auto;
  align-self: flex-start;
  font-size: 17px;
  background-color: transparent;
  border-style: none;
  color: white;
  cursor: pointer;
}

.widget-container-full,
.widget-container-half {
  padding-top: 20px;
}

.traffic-container {
  grid-area: traffic;
}

.traffic-headline {
  margin: 30px 0px 7px 0px;
}

.traffic-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}

.traffic-nav-link {
  list-style-type: none;
  padding: 5px 10px;
}
 
.daily-traffic-graph {
  grid-area: dailyTraffic;
}

.mobile-users-chart {
  grid-area: mobileTraffic;
}


/* social (media) container styles start */
.social-stats {
  grid-area: social;
  padding-bottom: 0;
}

.social__outer-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.social__inner-container {
  background-color: #f5f5f5;
  border: 1px solid #cccccc;
  border-radius: 15px;
  display: flex;
  flex-direction: row;
  margin-bottom: 20px;
  width: 100%;
}

.social-image {
  background-color: #7477bf;
  border-radius: 50%;
  height: 80px;
  width: 80px;
  margin: 20px 0px 20px 20px;
}

.social-icon {
  width: 40px;
  height: 40px;
  fill: white;
  margin-left: 20px;
  margin-top: 20px;
}

.social-text {
  width: 60%;
  padding: 20px;
}

.social__colored-font {
  color: #7477bf;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 1.3px;
}

.social__stat-numbers {
  color: #777777;
  font-size: 41px;
  font-weight: 900;
}
/* social (media) container styles end */

/* start of new members and recent activity */
.members__outer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0px;
}

.profile-image {
  border-radius: 50%;
  width: 70px;
  height: auto;
}

.members-text > a {
  text-decoration: none;
  color: #7477bf;
}

.members-text > p {
  width: 283px;
}

.members__date-or-time {
  padding-bottom: 10px;
  border-bottom: 1px solid #cccccc;
  width: 280px;
}

.no-bottom-border {
  border-bottom: none;
  padding-bottom: 0px;
}

.new-members {
  grid-area: newMembers;
}

.recent-activity {
  grid-area: recentActivity;
}

.carret-right {
  display: none;
}
/* end of new members and recent activity */

.messaging-users__outer-container {
  grid-area: messageUser;
  display: flex;
  flex-direction: column;
}  

.form-field,
.form-area {
  background-color: #f5f5f5;
  border: 1px solid grey;
  border-radius: 5px;
  font-family: inherit;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
}

.form-area {
  height: 150px;
}

.button-primary {
  width: 100%;
  height: 50px;
  color:white;
  background-color:#7477bf ;
  border-radius:  5px;
  box-shadow: none;
  border: 1px solid grey;
  text-transform: uppercase;
}

#send.button-primary {
  margin-top: 10px;
}

.settings {
  grid-area: settings;
  margin-bottom: 0px;
}

.toggle-button__inner-container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin: 26px 0px;
}

.toggle-button__inner-container p {
  font-weight: 500;
  text-transform: capitalize;
  width: 200px;
}

#save, #cancel {
  width: 50%;
  height: 40px;
  border-radius: 5px;
}

#save { margin-right: 7.5px; }
#cancel { margin-left: 7.5px; }

.button-disabled {
  background-color: #999999;
  color: white;
  border: 1px solid grey;
  text-transform: uppercase;
}

.settings-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: auto;
  margin: 15px 0;
}

.active {
  background-color: #81c98f;
  color: white;
  border-radius: 20px;
}

/* switch button in settings */
input[type="checkbox"].switch {
	font-size: 16px;
  appearance: none;
	width: 80px;
	height: 29px;
	background: #f5f5f5;
  color: white;
  border: 2px solid #cccccc;
	border-radius: 348px;
	position: relative;
	cursor: pointer;
	outline: none;
	transition: all .2s ease-in-out;
  }
  
  input[type="checkbox"].switch:checked {
	  background: #7477bf;
  }
  
  input[type="checkbox"].switch:after {
    position: absolute;
    content: "";
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 .25em rgba(0,0,0,.3);
    transform: scale(.7);
    left: 0;
    transition: all .2s ease-in-out;
  }
  
  input[type="checkbox"].switch:checked:after {
	  left: calc(100% - 1.5em);
  }
  
  input[type="checkbox"].switch:checked:before {
    content: 'ON';
    position: absolute;
    top: 5px;
    left: 6px;
    font-size: 14px;
  }
/* switch style end */


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


@media (min-width: 768px) {
  * { overflow-x: hidden; }
  
  .header-container {
    align-items: center;
    justify-content: space-between;
  }

  .header__sub-container--left {
    font-size: 21px;
  }

  .header__sub-container--right {
    width: 36%;
    overflow: hidden;
  }

  .header__notifications-circle {
    left: 531px;
  }

  .header__vertical-line {
    display: inline-block;
  }

  .body-grid-container {
    grid-template-columns: 70px 1fr;
    grid-template-areas:
      "header header"
      "navigation main";
  }

  .navigation-container {
    flex-direction: column;
    justify-content: flex-start;
  }

  .navigation-container svg {
    margin-top: 10px;
  }

  input[type="search"]#searchSite {
    width: 278px;
  }

  .main-container {
    display: grid;
    grid-template-columns: 50%; /* 2 column layout on tablet and desktop screens */
    grid-template-areas: 
      "mainHeader mainHeader"
      "alertBanner alertBanner"
      "traffic traffic"
      "dailyTraffic mobileTraffic"
      "social social"
      "newMembers newMembers"
      "recentActivity recentActivity"
      "messageUser messageUser"
      "settings settings";
  }

  .alert-banner {
    margin: 0px 20px;
    width: initial;
  }

  .alert-banner-close {
    padding-left: 310px;
  }

  .traffic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 0;
  }

  .traffic-headline {
    margin: 0;
  }

  .traffic-nav {
    flex-shrink: 2;
  }

  .traffic-container,
  .social__outer-container {
    grid-column: 1 / span 2;
  }

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

  .mobile-users-chart {
    grid-column: 2 / span 1;
    border-left: 1px solid #cccccc;
  }


  .recent-activity,
  .messaging-users__outer-container,
  .settings {
    grid-column: 1 / span 2;
  }

  .members {
    display: flex;
    flex-flow: column;
    align-content: flex-start;
  }

  .members__outer-container {
    flex-direction: row;
    text-align: left;
    border-bottom: 1px solid #cccccc;
  }

  .members__outer-container:last-child {
    border-bottom: none;
  }

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

  .members-text {
    padding: 0px 50px 0px 30px;
  }

  .members__date-or-time {
    width: 120px;
    border: none;
    text-align: right;
  }

  .hours-display {
    text-align: left;
  }

  .carret-right {
    color: #7477bf;
    display: inline-block;
    width:120px;
    font-size: 25px;
    padding-left: 107px;
  }
  
  .widget-container-full {
    width: 86vw;
  }

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

 .social__outer-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
  }
 
  .social__outer-container h3 {
    width: 100%;
  }

  .social-image {
    height: 60px;
    width: 60px;
    margin: 15px 0px 15px 15px;
  }

  .social-icon {
    width: 30px;
    height: 30px;
    margin-left: 15px;
    margin-top: 15px;
  }

  .social-text {
    padding: 14px;
  }

  .social__colored-font {
    font-size: 15px;
  }

  .social__stat-numbers {
    font-size: 30px;
  }

  .social__inner-container {
    width: 32%;
  }

  .social__inner-container:nth-of-type(2) {
    margin: 0 8px;
  }

  .members-text > p{
    width: 380px;
  }

  .messaging-users__inner-container {
    width: 95%;
  }

  .toggle-button__inner-container {
    justify-content: start;
  } 
}


@media (min-width: 1024px) {

  .header__sub-container--left {
    font-size: 23px;
  }

  .header__sub-container--right {
    width: 22%;
    position: relative;
  }

  .header__notifications-circle {
    position: absolute;
    top: 7%;
    left: 14%;
  }

  .main-container {
   display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
    "mainHeader mainHeader"
    "alertBanner alertBanner"
    "traffic traffic"
    "dailyTraffic mobileTraffic"
    "social social"
    "newMembers recentActivity"
    "messageUser settings";
  }

  .new-members, .messaging-users__outer-container {
    grid-column: 1 / span 1;
  }

  .recent-activity, .settings {
    grid-column: 2 / span 1;
    border-left: 1px solid #cccccc;
  }

  .main__header-headline {
    width: 15%;
  }

  input[type="search"]#searchSite {
    width: 275px;
  }

  .widget-container-full {
    width: 89vw;
  }

  .social__outer-container {
    width: 97%;
  }

  .members-text {
    padding: 0px 0px 0px 15px;
  }

  .members-text > p {
    width: 230px;
  }

  .members__date-or-time {
    width: 110px;
  }

  .messaging-users__inner-container{
    width: 92%;
  }

  .settings {
    width: 100%;
  }

  .toggle-button__inner-container {
    margin: 14px 0px 28px 0px;
  }

  #timezone.form-field {
    margin-top: 47px;
  }
  
  #save, #cancel {
    height: 50px;
    width: inherit;
  }
  .settings-button {
    margin: 9px 0;
  }
}