$button-link-color: #fff;
$primary-color: #2c3637;
$green: #1fa69a;

@import "../../node_modules/spectre.css/src/_variables.scss";
@import "../../node_modules/spectre.css/src/_mixins.scss";
@import "../../node_modules/spectre.css/src/_normalize.scss";
@import "../../node_modules/spectre.css/src/_base.scss";
@import "../../node_modules/spectre.css/src/_cards.scss";
@import "../../node_modules/spectre.css/src/_typography.scss";
@import "../../node_modules/spectre.css/src/_layout.scss";
@import "../../node_modules/spectre.css/src/_forms.scss";
@import "../../node_modules/spectre.css/src/_buttons.scss";

// Button Colors
.btn {
  padding: 0.25rem 0.5rem;
}

.btn-green {
  @include button-variant($green);
  &:visited {
    color: #fff;
  }
}

@import "../../node_modules/spectre.css/src/_media.scss";
@import "../../node_modules/spectre.css/src/_tiles.scss";
@import "../../node_modules/spectre.css/src/_navbar.scss";


html, body{
  height: 100%;
}

#mpcs-navbar,
#mpcs-sidebar-navbar {
  height: 50px;
  background-color: #2c3637;
  font-size: 0.7rem;

  .figure {
    margin: 0;
    width: 28px;
    height: 28px;
    img {
      border-radius: 50%;
    }
  }

  button {
    height: 100%;
    border: 0;
    cursor: pointer;
    width: 100%;
  }

  button:not(#previous_lesson_link) {
    @include button-variant($green);
  }

  button#previous_lesson_link {
    @include button-variant($primary-color);
  }

  // Button Colors
  .btn {
    background: transparent;
    border-color: transparent;
    color: darken($light-color, 10%);
    font-size: 0.7rem;
    &:focus,
    &:hover,
    &:active,
    &.active {
      color: $light-color;
    }
    &.nav-back {
      font-size: 1rem;
    }
  }

  .sidebar-open,
  .sidebar-close {
    font-size: 0.8rem;
  }

  .navbar-section {
    flex: none;

    li {
      list-style: none;
    }

    @media (min-width: $size-md) {
      &:first-child {
        width: 25%;
      }
      &:last-child {
        width: 75%;
      }
    }

    .navbar-brand img {
      max-height: 30px;
    }

    @media (max-width: $size-md) {
      &:first-child {
        // width: 25%;
      }
      &:last-child {
        // width: 75%;
        flex-grow: 0.9;
      }
    }
  }
}

.course-progress {
  padding: 1em 1em 2em;

  h1 {
    font-size: 1rem;
    font-weight: bold;
  }

  .progress-bar {
    background-color: #e8ebef;
    border-radius: 10px;
    font-size: 0.6rem;
  }

  .user-progress {
    text-align: center;
    white-space: nowrap;
    background-color: #1da69a;
    height: 100%;
    display: block;
    width: 0%;
    border-radius: 10px;
  }

  .progress-text {
    color: #1da69a;
    text-align: center;
    span {
      font-weight: bold;
    }
    h2 {
      font-weight: bold;
    }
  }
}

.mpcs-classroom a {
  color: #007cba;
}

#mpcs-sidebar-navbar .btn {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  height: 100%;
}

.mpcs-nav-menu {
  margin: 0;

  li {
    display: inline;
  }
}

.mpcs-nav-menu-mobile {
  i {
    font-size: 1rem;
  }
}

.dropdown {
  display: inline-block;
  position: relative;
  text-align: left;

  .menu {
    background: #fff;
    border-radius: 0.1rem;
    box-shadow: 0 0.05rem 0.2rem rgba(48, 55, 66, 0.3);
    animation: slide-down 0.15s ease 1;
    display: none;
    left: 0;
    max-height: 50vh;
    overflow-y: auto;
    position: absolute;
    top: 100%;
    list-style: none;
    margin: 0;
    min-width: 200px;
    transform: translateY(0.35rem);
    z-index: 300;

    li {
      padding: 0.3rem 0.5rem;
      margin: 0;
    }
  }

  &.has-image {
    > a {
      padding-top: 0;
      padding-bottom: 0;
      margin-top: 5px;
    }
    .menu {
      transform: translateY(0.2rem);
    }
  }

  &.dropdown-right .menu {
    left: auto;
    right: 0;
  }

  a {
    width: 100%;
    display: inline-block;
  }

  @media (min-width: $size-sm) {
    margin-right: 5px;
  }
}

.dropdown .menu {
  display: none;
  max-height: 220px;
  padding: 0.5em;
  overflow: auto;
}

.dropdown.active .menu,
.dropdown .dropdown-toggle:focus + .menu,
.dropdown .menu:hover {
  display: block;
}

.entry-content {
  display: flex;
  min-height: calc(100% - 50px);

  .columns {
    flex-grow: 1;
  }

  .responsive-video {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    height: auto;
    padding-top: 56%;
  }
  .responsive-video * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .wp-block-embed {
    margin: 2em 0;
  }

  img {
    display: block;
    height: auto;
    max-width: 100%;
  }
}

#mpcs-sidebar.is-active {
  display: block !important;
}

#mpcs-sidebar {
  background: #f7f7f7;
  font-size: 0.7rem;
  transition: 0.5s;

  &.off-canvas {
    display: block !important;
    width: 250px;
  }

  p {
    margin: 0;
  }
  .mpcs-sidebar-menu {
    a {
      padding: 0.6em 1em;
      text-decoration: none;
      border-left: 5px solid transparent;

      &.is-active {
        background: #fff;
        border-left: 5px solid #2b3637;
      }
    }
  }

  .mpcs-sidebar-wrapper {
    border-right: 2px solid #e8ebef;
    height: 100%;
  }
  .tile {
    border-top: 0 !important;
  }

  @media (max-width: $size-sm) {
    display: block !important;
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    // background-color: #111;
    overflow-x: hidden;
    // padding-top: 60px;
  }

  .mpcs-section-title-text {
    font-size: 0.7rem;
  }
}

#mpcs-main {
  background: #fff;
  padding: 1.5rem 1rem;

  @media (min-width: $size-md) {
    padding: 1.5rem 3rem;
  }

  h1 {
    font-size: 1.4rem;
    font-weight: 500;
  }

  h2 {
    font-size: 1.2rem;
    font-weight: 500;
  }

  .entry-title {
    i {
      font-size: 0.8em;
      margin-right: 5px;
    }
    i::before {
      margin: 0;
    }
  }

  #bookmark {
    background: #d7ebe9;
    border-radius: 50px;
    margin-bottom: 2em;

    a {
      border: 0;
      border-radius: 50px;
      margin-right: 0.5em;
      padding-right: 0;
    }

    i {
      font-size: 1rem;
    }
  }

  .mpcs-bookmark-link-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  transition: margin-left 0.5s;

  &.off-canvas {
    margin-left: 250px;
  }
}

.mpcs-section {
  background-color: #f7f8f9;
  margin-bottom: 2em;
}

.mpcs-section-title {
  background: #e8e8e8;
  padding: 0.5em 1em;
}

.mpcs-section-title-text {
  font-size: 0.9rem;
  font-weight: bold;
}

.mpcs-lesson {
  &:hover {
    background-color: #e5e5e5;
  }

  .mpcs-lesson-button {
    margin-left: auto;
  }

  .mpcs-lesson-row-link {
    display: block;
    padding: 0.5em 1em;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #fff;
    color: inherit;

    &:hover {
      text-decoration: none;
    }
  }

  .mpcs-lesson-link {
    margin-left: 10px;
    line-height: normal;
  }

  i {
    font-size: 0.9rem;

    &.mpcs-doc-text-inv {
      font-size: 0.9em;
      margin-right: 3px;
    }
    &.mpcs-check-circle-regular,
    &.mpcs-circle-regular {
      color: $green;
    }
  }

  .btn {
    font-size: 0.7rem;
    height: 1.5rem;
    line-height: 1rem;
  }

  &.completed:not(.current) {
    i,
    a {
      color: #999 !important;
      span:hover {
        background: none;
      }
    }
  }
  &.current {
    background: rgba($green, 0.2);
  }
}

.mpcs-instructor {
  .tile-icon {
    width: 20%;
    text-align: center;

    img {
      border-radius: 5px;
    }
    p {
      font-weight: 500;
    }
    .tile-socials {
      list-style: none;
      margin-top: 5px;
      margin-left: 0px;
      
      li{
        display: inline;
      }
      a {
        color: #666;
      }
    }
  }

  .tile-title {
    font-size: 1rem;
  }

  .tile-content {
    padding-left: 2em !important;
  }

  .tile-description {
    margin-top: 1em;
    color: #333333;
  }

  .tile-meta {
    font-size: 0.7rem;
    margin-top: 10px;
  }

  p {
    margin: 0;
  }
}

.post-type-archive-mpcs-course {
  background: #fafafa;

  .entry-content {
    margin: 0 1em;

    @media (min-width: $size-md) {
      margin: 0 3em;
    }
  }

  .sidebar-open {
    display: none !important;
  }

  #mpcs-navbar .navbar-section {
    flex: 1 0 1;
  }
}

.mpcs-cards {
  .column {
    // padding: 1rem;
    margin-bottom: 1em;
  }
  .card {
    box-shadow: 0 0.25rem 1rem rgba(48, 55, 66, 0.15);
    height: 100%;
  }
  .card-title {
    h2 {
      margin: 0;
    }
  }
  .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    span {
      color: #66758c;
      display: inline-flex;
    }
    img {
      border-radius: 50px;
      margin-right: 5px;
      float: left;
    }
    &.price {
      color: $green;
      font-weight: bold;
    }
    .course-author {
      a {
        color: #007cba;
      }
    }
  }
}

.mpcs-course-filter {
  padding: 1.5em 0;

  .btn {
    background: #fff;
    color: #66758c;
    border: 0.05rem solid #bcc3ce;
  }

  .dropdown {
    .menu {
      background: #fafafa;
      padding: 0;
      li {
        margin: 0;
        font-size: 0.7rem;
        &:first-child {
          padding: 0;
          background: #fff;
          margin-bottom: 0.3rem;
          input {
            border: 0;

            &:focus {
              -webkit-box-shadow: none;
              -moz-box-shadow: none;
              box-shadow: none;
            }
          }
        }
      }
    }

    .btn span,
    .btn i {
      color: $green;
      font-weight: 500;
    }
  }

  .column {
    &:last-child {
    }

    @media (max-width: 600px) {
      text-align: center !important;
    }
  }

  .column:last-child {
    text-align: right;

    form {
      display: inline-block;
      width: 70%;

      @media (max-width: 600px) {
        width: 90%;
      }
    }
  }
}

@media (max-width: 600px) {
  .mpcs-course-filter .column:last-child {
    padding-top: 10px;
  }
}

.pagination {
  border-top: 0.05rem solid #bcc3ce;
  margin: 3em 0;
  text-align: right;
}

.pagination li a,
.pagination li a:hover,
.pagination li.active a,
.pagination li.disabled {
  color: #bbb;
  text-decoration: none;
}

.pagination li {
  display: inline;
}

.pagination li a,
.pagination li a:hover,
.pagination li.active a,
.pagination li.disabled {
  // background-color: #6fb7e9;
  border-radius: 3px;
  cursor: pointer;
  // padding: 12px;
  padding: 0.75rem;
  font-weight: 500;
}

.pagination li a:hover,
.pagination li.active a {
  // background-color: #3c8dc5;
  color: #333;
}

.mpcs-progress-ring {
  position: relative;
  text-align: center;
  width: 22px;
  height: 22px;
  border-radius: 100%;
  background-color: #1fa69a;
  background-image: linear-gradient(91deg, transparent 50%, #ccc 50%),
    linear-gradient(90deg, #ccc 50%, transparent 50%);
}
.mpcs-progress-ring .inner {
  position: relative;
  top: 2px;
  left: 2px;
  text-align: center;
  width: 18px;
  height: 18px;
  border-radius: 100%;
  background-color: #fff;
}
.mpcs-progress-ring .inner div {
  position: relative;
  top: 4px;
  color: #333;
  // font-weight: bold;
  font-size: 9px;
}

.mpcs-progress-ring .stat {
  line-height: 1em;
}

@media (min-width: $size-xl) {
  .mpcs-cards .column.col-4 {
    // padding-right: 1em;
    // margin-right: 0.3em;
    width: 32.33333333%;
    margin-right: 1em;
    margin-bottom: 2em;

    &:nth-child(3n) {
      margin-right: 0;
    }
  }
}

.single-mpcs-lesson .navbar-brand img {
  @media (max-width: $size-md) {
    display: none;
  }
}

.wp-embed-responsive
  .wp-block-embed.wp-embed-aspect-1-1
  .wp-block-embed__wrapper::before,
.wp-embed-responsive
  .wp-block-embed.wp-embed-aspect-1-2
  .wp-block-embed__wrapper::before,
.wp-embed-responsive
  .wp-block-embed.wp-embed-aspect-16-9
  .wp-block-embed__wrapper::before,
.wp-embed-responsive
  .wp-block-embed.wp-embed-aspect-18-9
  .wp-block-embed__wrapper::before,
.wp-embed-responsive
  .wp-block-embed.wp-embed-aspect-21-9
  .wp-block-embed__wrapper::before,
.wp-embed-responsive
  .wp-block-embed.wp-embed-aspect-4-3
  .wp-block-embed__wrapper::before,
.wp-embed-responsive
  .wp-block-embed.wp-embed-aspect-9-16
  .wp-block-embed__wrapper::before {
  padding-top: 0%;
}

/* Comments
--------------------------------------------- */
.comment-content a {
	word-wrap: break-word;
}

.bypostauthor {
	display: block;
}

/* Widgets
--------------------------------------------- */
.widget {
	margin: 0 0 1.5em;
}

.widget select {
	max-width: 100%;
}

/* Media
--------------------------------------------- */
.page-content .wp-smiley,
.entry-content .wp-smiley,
.comment-content .wp-smiley {
	border: none;
	margin-bottom: 0;
	margin-top: 0;
	padding: 0;
}

/* Make sure logo link wraps around logo image. */
.custom-logo-link {
	display: inline-block;
}

/* Captions
--------------------------------------------- */
.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8075em 0;
}

.wp-caption-text {
	text-align: center;
}

/* Galleries
--------------------------------------------- */
.gallery {
	margin-bottom: 1.5em;
	display: grid;
	grid-gap: 1.5em;
}

.gallery-item {
	display: inline-block;
	text-align: center;
	width: 100%;
}

.gallery-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
	grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
	grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
	grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
	display: block;
}

/*--------------------------------------------------------------
# Plugins
--------------------------------------------------------------*/

/* Jetpack infinite scroll
--------------------------------------------- */

/* Hide the Posts Navigation and the Footer when Infinite Scroll is in use. */
.infinite-scroll .posts-navigation,
.infinite-scroll.neverending .site-footer {
	display: none;
}

/* Re-display the Theme Footer when Infinite Scroll has reached its end. */
.infinity-end.neverending .site-footer {
	display: block;
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/

/* Accessibility
--------------------------------------------- */

/* Text meant only for screen readers. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Do not show the outline on the skip link target. */
#primary[tabindex="-1"]:focus {
	outline: 0;
}

/* Alignments
--------------------------------------------- */
.alignleft {

	/*rtl:ignore*/
	float: left;

	/*rtl:ignore*/
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {

	/*rtl:ignore*/
	float: right;

	/*rtl:ignore*/
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}

/* Front end theme for MemberPress pages */

.mp_wrapper {
  overflow: inherit;
  /* margin: 10px 0; */
  /* max-width: 740px !important; */
  /* margin: 0 auto; */
  box-sizing: border-box;
}

.mp_wrapper h1,
.mp_wrapper h2,
.mp_wrapper h3 {
  font-weight: normal;
  border: none;
  outline: none;
  background: none;
}

.mp_wrapper img {
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.mp_wrapper :focus {
  outline: 0;
}

.mp_wrapper form {
  text-align: left;
}

.mp_wrapper textarea,
.mp_wrapper select,
.mp_wrapper input[type=text],
.mp_wrapper input[type=url],
.mp_wrapper input[type=email],
.mp_wrapper input[type=tel],
.mp_wrapper input[type=number],
.mp_wrapper input[type=password] {
  width: 100%;
  outline-style: none;
  font-size: inherit;
  font-family: inherit;
  padding: 10px;
  letter-spacing: normal;
  border: 1px solid rgba(0, 0, 0, 0.2);
  /* margin-bottom: 10px !important; */
  display: inline;
  box-sizing: border-box;
}

.mepr-stripe-card-element {
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  padding: 10px !important;
  background-color: white;
}

.mepr-stripe-card-errors {
  color: #eb1c26;
}

.mp_wrapper label,
.mp_wrapper .mp-row {
  font-size: inherit;
  font-family: inherit;
  letter-spacing: normal;
  display: inline-block;
/*
  font-weight: bold;
  margin-bottom: 5px;
*/
}

.mp_wrapper .mepr-radios-field,
.mp_wrapper .mepr-checkbox-field,
.mp_wrapper .mepr-checkboxes-field,
.mp_wrapper label {
  width: 100% !important;
  display: inline-block;
}

.mp_wrapper .mp-form-row {
  margin-bottom: 10px;
  width: 100% !important;
}

.mp_wrapper input[type=image] {
  border: none !important;
  padding: 0 !important;
  width: auto !important;
}

.mp_wrapper textarea {
  outline-style: none;
  font-size: inherit;
  font-family: inherit;
  letter-spacing: normal;
  padding: 4px 2px 4px 2px;
  resize: none;
}

.mp_wrapper .mepr_price label,
.mp_wrapper .mepr_price .mepr_price_cell,
.mp_wrapper .mepr_price .mepr_price_cell_label {
  display: inline !important;
}

table.mp-table thead,
table.mp-table tbody,
table.mp-table tfoot,
table.mp-table tr,
table.mp-table th,
table.mp-table td {
  border: 0;
  font-family: inherit;
  font-size: 100%;
  font-style: inherit;
  font-weight: inherit;
  margin: 0;
  outline: 0;
  padding: 0;
  vertical-align: baseline;
}

table.mp-table {
  display: block;
  border-collapse: separate;
  border-spacing: 0;
  border-width: 1px 0 0 1px !important;
  margin-bottom: 24px;
  width: 100% !important;
  display: table;
}

table.mp-table thead {
  display: table-header-group;
}

table.mp-table tfoot {
  display: table-footer-group;
}

table.mp-table tr {
  display: table-row;
}

table.mp-table,
table.mp-table th,
table.mp-table td {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

table.mp-table th,
table.mp-table td {
  display: table-cell;
  padding: 8px;
  border-width: 0 1px 1px 0 !important;
}

table.mp-table th {
  text-align: left;
  font-weight: bold;
  text-transform: uppercase;
}

table.mp-table .mp-currency-cell {
  text-align: right;
}

.mepr_error, .mepr_updated {
  padding: 5px 5px 5px 15px !important;
  margin-bottom: 25px !important;
  box-sizing: border-box !important;
  width: 100%;
}

.mepr_error {
  background-color: #feb9bb !important;
  border: 1px solid #d40022 !important;
}

.mepr_error ul {
  padding: 0 0 5px 0 !important;
  margin: 0 !important;
}

.mepr_error ul li {
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mepr_updated {
  background-color: #def4c5 !important;
  border: 1px solid #4d8c2e !important;
}

.mepr-form input.invalid,
.mepr-form select.invalid,
.mepr-form textarea.invalid,
.mepr-form label.mepr-checkbox-field.invalid,
.mepr-form div.mepr-checkboxes-field.invalid,
.mepr-form div.mepr-radios-field.invalid {
  border: 2px solid red !important;
  background-color: #FF6666 !important;
}

.validation.failed:after {
  color: red;
  content: 'Validation failed';
}

.validation.passed:after {
  color: green;
  content: 'Validation passed';
}

.mepr-radios-field, .mepr-checkboxes-field {
  display: inline-block !important;
  width: 250px !important;
  margin-bottom: 10px !important;
}

.mepr-radios-field-row, .mepr-checkboxes-field-row {
  display: block !important;
  padding-left: 0 !important;
  margin-left: 2px !important;
}

input.mepr-form-radios-input, input.mepr-form-checkboxes-input {
  padding-left: 0;
  margin-left: 0;
  width: auto;
  margin-right: 5px;
  display: inline !important;
  text-align: left;
}

label.mepr-form-radios-label, label.mepr-form-checkboxes-label {
  display: inline !important;
  width: 222px !important;
  max-width: 222px !important;
  min-width: 222px !important;
}

.mp_wrapper .mp-form-row label {
  display: inline !important;
}

.mepr-hidden {
  display: none;
}

.mepr-visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 0;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

/* users subscriptions list shortcode css */
.mp_users_subscriptions_list ul {
  list-style:none !important;
}

.mp_users_subscriptions_list ul li {
  padding:5px !important;
  margin:0 !important;
}

li.mp_users_subscriptions_list_alt {
  background:#eee;
}
