/**
 * LESS for Calendar Legend
 *
 * @category  Web Development Framework
 * @package   bethesda
 * @source    calendar-legend.less
 * @author    Danima Technologies Inc. <admin@danima.com>
 * @copyright 2019© Danima Technologies Inc.®
 * @license   W3C https://opensource.org/licenses/W3C
 * @link      https://www.danima.com/
 *
 * @since Thursday, August 22nd, 2019, 4:06:07 PM
 */

@fa-var-check: "\f00c";
@fa-var-ban: "\f05e";

.fa-icon() {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
	line-height: 1;
  }

.fa,
.fas {
  font-family: 'FontAwesome';
  font-weight: 700;
}
/*@fa-font-path: "/webfonts";*/

@brown: #683a3a;
@d-brown: #4d2b2b;
@text-brown: #8f5b5b;
@grey: #ebe6e6;


@bethesda_child_light_blue: @brown;
@bethesda_child_green: #3C6980;

#calendar-legend {
	display: -moz-grid;
	display: grid;
	grid-template: "1fr 1fr 1fr 1fr";
	grid-gap:10px;

	@media(max-width:767px){
		display:block;
		/*grid-template: "1fr 1fr";*/
	}

	.legend-item {
		padding: 0.5rem 1rem;
		background-color: #F2F2F2;
		text-align: center;
		color: #FFF;
		position: relative;
		height: 40px;

		>.bg {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			background-color: rgba(0, 0, 0, 0.25);
			box-shadow:nset 0 -2px 1px 0 rgba(255,255,255,0.5);
			z-index: 0;
			transition:background-color 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),box-shadow 0.4s  cubic-bezier(0.165, 0.84, 0.44, 1);

			&::before {
				.fa-icon;
				.fas;
				display: block;
				position: absolute;
				height:100%;
				line-height:40px;
				left:.5rem;
			}
		}
		>input[type="checkbox"] {
			float: left;
			appearance: none;
/*			display: none;*/
			&:not(:checked) + .bg + span {
				color: #ECECEC;
				text-shadow: 0 0 0 #FFF;
				transition:all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
			}
			&:checked+.bg{
				box-shadow:inset 0 -4px 1px 0 rgba(255,255,255,0.5);
				// transform:translateY(-10px) scale(1.025);
				z-index:1;
				&+span{
					// transform:translateY(-10px);
					color:#FFF;
				}
				&::before {
					content: @fa-var-check;
				}
			}
			&:not(:checked)+.bg::before{
				content: @fa-var-ban;
			}
		}

		>span {
			z-index: 10;
			width: 90%;
			display: inline-block;
			position: relative;
			color:#FFF;
			text-shadow: 0 0 10px rgba(200,200,200,0.5);
			transition:all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
			pointer-events:none;
			user-select: none;
			line-height:20px;
		}

		&.events input[type="checkbox"]{
			&:checked+.bg, &:checked+.bg+span{
				background-color: @bethesda_child_light_blue;
			}
			&:not(:checked)+.bg, &:not(:checked)+.bg+span{
				background-color: @bethesda_child_light_blue;
			}
		}

		&.programs input[type="checkbox"]{
			&:checked+.bg, &:checked+.bg+span {
				background-color: @bethesda_child_green;
			}
			&:not(:checked)+.bg, &:not(:checked)+.bg+span{
				background-color: @bethesda_child_green;
			}
		}
	}
}

#calendar{
	&.events{
		.calEvent{
			background-color:@bethesda_child_light_blue;
			border-color:darken(@bethesda_child_light_blue,10%);
			color:#FFF !important;
			cursor:pointer;
			pointer-events: none;
			user-select: none;
			margin:1px 5px 0;
		}
	}

	&:not(.events){
		.calEvent{
			display:none;
		}
	}

	&.programs{
		.calProgram{
			background-color:@bethesda_child_green;
			border-color:darken(@bethesda_child_green,10%);
			color:#FFF !important;
			cursor:pointer;
			pointer-events: none;
			user-select: none;
			margin:1px 5px 0;
		}
	}

	&:not(.programs){
		.calProgram{
			display:none;
		}
	}
}

#calendar {
	a.fc-day-grid-event {
		&.calendar-event, &.calendar-program, &.calendar-seminar, &.calendar-educational {
			display:none;
		}

		&.calendar-event {
			background-color:@bethesda_child_light_blue;
			border-color:darken(@bethesda_child_light_blue,10%);
			color:#FFF !important;
		}

		&.calendar-program {
			background-color:@bethesda_child_green;
			border-color:darken(@bethesda_child_green,10%);
			color:#FFF !important;
		}
	}

	&.events a.fc-day-grid-event.calendar-event {display:block;}
	&.programs a.fc-day-grid-event.calendar-program {display:block;}
}

#data-list{
  &.events {
    #results .resultRow.events {
      .result-date span {
        color: @brown;
      }
      .result-more-details .bg-blue {
        background-color: @brown;
        border-color: @brown;
      }
    }
  }
  &:not(.events){
    #results .resultRow.events{
      display:none;
    }
  }

  &.programs {
    #results .resultRow.programs {
      .result-date span {
        color: @d-brown;
      }
      .result-more-details .bg-blue {
        background-color: @d-brown;
        border-color: @d-brown;
      }
    }
  }
  &:not(.programs){
    #results .resultRow.programs{
      display:none;
    }
  }
}
