/** TEMPLATE PAGE **/

/***** Global *****/
#bookacti-template-container *, #bookacti-template-container *:after, #bookacti-template-container *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }

#bookacti-template-container  { display: table; margin: 20px auto; }
#bookacti-template-container::after { clear: both; }
#bookacti-template-container + hr { margin: 30px auto; }

#bookacti-template-container .fc-toolbar-chunk { position: relative; }
.bookacti-go-to-datepicker { position: absolute; z-index: 10; height: 34px; }
.fc-goTo-button .bookacti-spinner       { zoom: .5; display: inline-block; vertical-align: middle; margin-left: 15px; }
.rtl .fc-goTo-button .bookacti-spinner  { margin-left: 0; margin-right: 15px; }
.fc-goTo-button .bookacti-spinner:after { background-color: #F5F5F5; }


/***** Events *****/
#bookacti-template-container .bookacti-total-availability::before { content: '/'; }

#bookacti-template-container .fc-helper { cursor: move; }
#bookacti-template-container .fc-event.bookacti-duplicate-event,
#bookacti-template-container .fc-helper.bookacti-duplicate-event { cursor: copy; }
#bookacti-template-container .fc-event.bookacti-event-dragged.bookacti-duplicate-event { visibility: visible !important; }

#bookacti-template-calendar .fc-event:hover .fc-event-main { background: linear-gradient( to bottom, rgba( 44,62,80,0.15 ) 0%, rgba( 0,0,0,0 ) 100% ); }

#bookacti-template-calendar .fc-timegrid-event .fc-event-resizer             { color: #fff; text-align: center; font-family: monospace; }
#bookacti-template-calendar .fc-timegrid-event:hover .fc-event-resizer:after { content: "="; display: inline-block; vertical-align: top; line-height: 0px; }

/* Event actions */
.bookacti-event-actions      { position: absolute; right: 0; top: -24px; opacity: 0; pointer-events: none; height: 24px; white-space: nowrap; padding: 2px 3px; border-radius: 0 0 0 3px; z-index: 5; background: rgba( 0, 0, 0, 0.4 ); color: #fff; transition: all 0.2s; }
.rtl .bookacti-event-actions { right: auto; left: 0; border-radius: 0 0 3px 0; }
.bookacti-event-action       { display: inline-block; min-width: 16px; max-width: 16px; text-align: center; vertical-align: middle; margin-right: 8px; }
.rtl .bookacti-event-action  { margin-right: 0; margin-left: 8px; }
.bookacti-event-action:last-child      { margin-right: 0; }
.rtl .bookacti-event-action:last-child { margin-left: 0; }

#bookacti-template-calendar .bookacti-selected-event .bookacti-event-actions       { top: 0; opacity: 1; pointer-events: auto; }
#bookacti-template-calendar .bookacti-selected-event .bookacti-event-action        { display: none; }
#bookacti-template-calendar .bookacti-selected-event .bookacti-event-action-select { display: inline-block; }

#bookacti-template-calendar .fc-event:hover .bookacti-event-actions { top: 0; opacity: 1; pointer-events: auto; }
#bookacti-template-calendar .fc-event:hover .bookacti-event-action  { display: inline-block; }

.bookacti-event-action-select                                       { width: 20px; height: 20px; }
.bookacti-event-action-select-checkbox								{ margin: 0; border-radius: 50%; min-width: 16px !important; min-height: 16px !important; max-width: 16px !important; max-height: 16px !important; width: 16px !important; height: 16px !important; }
.bookacti-event-action-select-checkbox:not(:checked):hover::before	{ content: "\f147"; margin: -3px 0 0 -4px; color: #aaa; float: left; display: inline-block; vertical-align: middle; width: 16px !important; font: 400 21px/1 dashicons; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.bookacti-event-action-select-checkbox::before      { margin: -3px 0 0 -4px !important; font: 400 21px/1 dashicons !important; }
.rtl .bookacti-event-action-select-checkbox::before { margin: -3px -2px 0 0 !important; }
#bookacti-template-calendar .fc-timegrid-event-harness-inset .fc-timegrid-event.bookacti-selected-event,
#bookacti-template-calendar .bookacti-selected-event				{ box-shadow: inset 0 0 1px #000, 0 0 0 1px #fff; }
#bookacti-template-calendar .bookacti-selected-event:not(.bookacti-picked-event) .fc-event-main { background: linear-gradient( to bottom, rgba( 255,255,255,0.15 ) 0%, rgba( 255,255,255,0 ) 75% ); transition: background 0.2s; }

.bookacti-event-action-edit-button			{ font-size: 16px; transition: color 0.2s; padding-top: 1px; }
.bookacti-event-action-edit-button:hover	{ color: #aaa; cursor: pointer; }

/* Touch devices fix */
#bookacti-template-calendar .fc-event-selected:before, #bookacti-template-calendar .fc-event:focus:before { z-index: 1; }


/***** Sidebar *****/
#bookacti-template-sidebar      { min-width: 240px; width: 240px; padding-right: 20px; border-right: 1px dashed #aaa; resize: both; overflow: auto; }
.rtl #bookacti-template-sidebar { padding-right: 0; padding-left: 20px; border-right: none; border-left: 1px dashed #aaa; }

#bookacti-template-sidebar .dashicons:before		{ color: #565d61; }
#bookacti-template-sidebar .dashicons:hover:before	{ color: #418FB6; }

.bookacti-templates-box			{ padding: 10px; margin-bottom: 12px; border-bottom: 1px solid #bbb; }
.bookacti-template-box-title	{ width: 100%; font-size: 1.2em; margin-bottom: 10px; font-weight: bold; }

.bookacti-template-box-title h4	{ display: table-cell; width: 100%; vertical-align: middle; }
.bookacti-insert-button			{ display: table-cell; padding-left: 4px; vertical-align: middle; cursor: pointer; }
#bookacti-template-sidebar .dashicons.bookacti-insert-button:before { color: #418FB6; }

#bookacti-template-picker-container { display: table-cell; width: 100%; vertical-align: middle; }
#bookacti-template-picker           { width: 100%; }
#bookacti-update-template           { display: table-cell; vertical-align: middle; padding-left: 10px; cursor: pointer; }
.rtl #bookacti-update-template      { padding-left: 0; padding-right: 10px; }

.bookacti-activity                 { width: 100%; height: 24px; }
.bookacti-activity-container       { display: table-cell; width: 100%; max-width: 120px; vertical-align: middle; overflow: hidden; }
.bookacti-activity-visibility      { display: table-cell; vertical-align: middle; padding-right: 10px; cursor: pointer; }
.rtl .bookacti-activity-visibility { padding-right: 0; padding-left: 10px; }
.bookacti-activity-settings        { display: table-cell; vertical-align: middle; padding-left: 10px; cursor: pointer; }
.rtl .bookacti-activity-settings   { padding-left: 0; padding-right: 10px; }
.bookacti-activity-draggable       { cursor: move; height: 18px; max-height: 18px; padding: 0 5px; width: 100%; border-radius: 3px; color: #fff; font-size: .85em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bookacti-activity-disabled        { opacity: 0.5; }

#bookacti-template-activities-container,
#bookacti-template-groups-of-events-container	{ padding-right: 6px; }
#bookacti-template-activity-list,
#bookacti-group-categories						{ overflow-y: auto; resize: vertical; padding: 0 4px 12px 0; }
.bookacti-group-category-title,
.bookacti-update-group-category,
.bookacti-group-of-events-title,
.bookacti-update-group-of-events,
.bookacti-group-category-title span     { display: table-cell; vertical-align: middle; }
.bookacti-update-group-category         { padding-left: 10px; cursor: pointer; }
.rtl .bookacti-update-group-category    { padding-left: 0; padding-right: 10px; }
.bookacti-update-group-of-events        { padding-right: 8px; cursor: pointer; }
.rtl .bookacti-update-group-of-events   { padding-right: 0; padding-left: 8px; }
.bookacti-groups-of-events-editor-list      { margin-left: 8px; padding-left: 7px; margin-top: 8px; border-left: 1px dotted rgba(0,0,0,0.3); overflow-y: auto; resize: vertical; overflow-x: hidden; cursor: pointer; }
.rtl .bookacti-groups-of-events-editor-list	{ margin-left: 0; margin-right: 8px; padding-left: 0; padding-right: 7px; border-left: none; border-right: 1px dotted rgba(0,0,0,0.3); }
.bookacti-group-category-title          { width: 100%; cursor: pointer; }
.bookacti-group-category-title span     { font-weight: 600; }
.bookacti-group-category-title,
.bookacti-group-of-events-title         { width: 100%; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all 0.2s; }
.bookacti-group-of-events-title:hover   { cursor: pointer; padding-left: 10px; }
.bookacti-group-category .bookacti-group-category-title::before                       { display: table-cell; vertical-align: middle; font-family: sans-serif; font-size: 0.8em; position: relative; min-width: 16px; text-align: left; }
.bookacti-group-category[data-show-groups='0'] .bookacti-group-category-title::before { content: '\25B7 '; }
.bookacti-group-category[data-show-groups='1'] .bookacti-group-category-title::before { content: '\25E2 '; }
.bookacti-group-category .bookacti-group-category-title::before      { padding-right: 5px; }
.rtl .bookacti-group-category .bookacti-group-category-title::before { padding-right: 0; padding-left: 5px; }
#bookacti-insert-group-of-events        { visibility: hidden; }
.bookacti-groups-of-events-editor-list,
#bookacti-template-add-first-group-of-events-container { display: none; }
.bookacti-group-category:not(:last-child) .bookacti-groups-of-events-editor-list  { margin-bottom: 10px; }
.bookacti-group-of-events.bookacti-selected-group .bookacti-group-of-events-title { font-weight: 600; padding-left: 10px; }

#bookacti-template-shortcuts-container ul { font-size: 0.85em; }

.bookacti-calendar-editor-sortable-placeholder { display: block; min-height: 20px; width: 100%; border: 1px dashed #b4b9be; margin: 10px 0; }


/***** template content *****/
/* Template calendar */
#bookacti-template-content      { display: table-cell; padding-left: 20px; width: 100%; }
.rtl #bookacti-template-content { padding-left: 0; padding-right: 20px; }
#bookacti-template-calendar     { vertical-align: top; width: 100%; }

/* First Template Area */
#bookacti-calendar-integration-tuto-container.bookacti-no-template,
#bookacti-template-sidebar.bookacti-no-template		{ display: none; }
#bookacti-first-template-container					{ height: 300px; }
#bookacti-first-template-container,
#bookacti-template-add-first-group-of-events-container,
#bookacti-template-first-activity-container			{ vertical-align: middle; text-align: center; width: 100%; }
#bookacti-add-first-template-button					{ cursor: pointer; font-size: 100px; width: 100px; height: 100px; }
#bookacti-template-add-first-group-of-events-button,
#bookacti-template-add-first-activity-button		{ cursor: pointer; font-size: 60px; width: 60px; height: 60px; }
#bookacti-add-first-template-button:hover,
#bookacti-template-add-first-group-of-events-button:hover,
#bookacti-add-first-template-button:hover			{ color: #418FB6; }


/***** Template dialogs *****/
/* General */
.bookacti-tabs .bookacti-tab-content .bookacti-promo-events-examples      { margin: 10px 0 0 0; }
.bookacti-tabs .bookacti-tab-content .bookacti-promo-events-examples div  { margin-bottom: 0; }
.bookacti-promo-events-examples a.fc-event                                { position: relative; display: inline-block; width: 115px; height: 84px; text-align: left; cursor: auto; overflow: clip; }
.rtl .bookacti-promo-events-examples a.fc-event                           { text-align: right; }
.bookacti-promo-events-examples	a.fc-event .fc-event-main                 { background: rgba(255,255,255,0.15); height: 100%; }
.bookacti-promo-events-examples	a.fc-event .bookacti-price-container      { display: block; width: fit-content; white-space: nowrap; margin: 4px auto; padding: 5px; font-weight: bolder; font-size: 1.2em; border-radius: 3px; background-color: rgba(0,0,0,0.3); color: #fff; }
.bookacti-promo-events-examples .fc-event-time, 
.bookacti-promo-events-examples .fc-event-title-container                 { line-height: 1.5em; }
.bookacti-promo-events-examples .bookacti-available-places > span         { display: inline; }
.bookacti-promo-events-examples .bookacti-available-places-avail-particle { margin: 0; }

/* Activity dialog */
#bookacti-activity-import-dialog label { display: inline-block; width: 150px; font-weight: bold; }
#bookacti-delete-activity-options { margin-top: 20px; }
.bookacti-roles-notice { display: none; margin-top: 10px; margin-bottom: 20px; }
#bookacti-display-activity-user-roles-container label,
#bookacti-display-group-category-user-roles-container label { display: inline-block; vertical-align: middle; width: auto; cursor: pointer; }
#bookacti-activity-roles, #bookacti-group-category-roles { width: 100% !important; }

/* Event dialog */
#bookacti-event-repeat-step-container, 
#bookacti-event-repeat-freq-container,
#bookacti-group-of-events-repeat-step-container,
#bookacti-group-of-events-repeat-freq-container  { display: inline-block; vertical-align: middle; }
#bookacti-event-repeat-step,
#bookacti-group-of-events-repeat-step            { width: 50px; }
.bookacti-repeat-freq-start-of-week-notice       { display: none; margin-top: 10px; }

/* Move an event dialog */
.bookacti-selected-event-dates						{ margin: 25px 0; }
.bookacti-update-repeated-event-dates-warning		{ margin-top: 25px; }
.bookacti-selected-event-start, 
.bookacti-selected-event-end						{ margin: 0 2px; }
#bookacti-update-event-dates-start-container label,
#bookacti-update-event-dates-end-container label	{ width: 80px; }

/* Move a booked event dialog */
.bookacti-bookings-nb::before, .bookacti-notifications-nb::before	{ content: ' ('; }
.bookacti-bookings-nb::after, .bookacti-notifications-nb::after		{ content: ') '; }
.bookacti-bookings-nb, .bookacti-notifications-nb { vertical-align: middle; margin: 0 4px; font-style: italic; }
.bookacti-update-booked-repeated-event-dates-warning, 
.bookacti-delete-booked-repeated-event-warning { color: #b81c23; }

/* Unbind dialog */
#bookacti-unbind-event-dialog .bookacti-selected-event-dates,
#bookacti-unbind-group-of-events-dialog .bookacti-selected-group-of-events-container { margin: 0 0 25px 0; }
#bookacti-unbind-event-dialog #bookacti-unbind-event-actions,
#bookacti-unbind-group-of-events-dialog #bookacti-unbind-group-of-events-actions { padding: 0 3em 0 3em; }
#bookacti-unbind-event-dialog .bookacti-unbind-action,
#bookacti-unbind-group-of-events-dialog .bookacti-unbind-action { padding-bottom: 2em; }
#bookacti-unbind-event-dialog .bookacti-unbind-action small,
#bookacti-unbind-group-of-events-dialog .bookacti-unbind-action small { display: inline-block; margin: 1em 2em 0 2em; }

/* Group of events dialog */
#bookacti-group-of-events-category-title-field-container { display: none; }
#bookacti-group-of-events-summary-label-container { display: flex; justify-content: space-between; }
#bookacti-group-of-events-summary-label { width: 220px; padding: 8px 0; }
.bookacti-backend-dialog .bookacti-selected-events-list { width: 100%; max-width: 100%; overflow: auto; resize: vertical; }
#bookacti-group-of-events-summary-preview-notice { display: none; margin: 10px 0; }
#bookacti-group-of-events-occurrences-navigation > .button { user-select: none; padding: 0 6px; }
#bookacti-group-of-events-occurrences-navigation #bookacti-group-of-events-occurrences-undo { padding: 0 12px; }
#bookacti-group-of-events-occurrences-navigation .dashicons { display: inline; font-size: 1.2em; vertical-align: middle; }


/***** RESPONSIVE DESIGN *****/

@media screen and ( max-width: 1200px ) {
	#bookacti-template-container .fc-header-toolbar                     { flex-wrap: wrap; flex-direction: row; }
	#bookacti-template-container .fc-header-toolbar .fc-today-button    { display: none; }
	#bookacti-template-container .fc-toolbar-chunk:nth-child(2)         { order: 1; flex: 0 1 100%; margin-bottom: 1.5em; text-align: center; }
	#bookacti-template-container .fc-toolbar-chunk:nth-child(1)         { order: 2; flex: 1 0 50%; text-align: left; }
	#bookacti-template-container .fc-toolbar-chunk:nth-child(3)         { order: 3; flex: 1 0 50%; text-align: right; }
	.rtl #bookacti-template-container .fc-toolbar-chunk:nth-child(1)    { text-align: right; }
	.rtl #bookacti-template-container .fc-toolbar-chunk:nth-child(3)    { text-align: left; }
}

/* Smartphone and tablet */
@media screen and ( max-width: 960px ) {
	#bookacti-template-sidebar,
	.rtl #bookacti-template-sidebar { width: 180px; padding: 0; margin: 0; border: none; }
	#bookacti-template-content      { padding-left: 12px; }
	.rtl #bookacti-template-content { padding-left: 0; padding-right: 12px; }
	
	.bookacti-event-action      { margin-left: 2px; }
	.rtl .bookacti-event-action { margin-left: 0; margin-right: 2px; }
	
	.bookacti-group-category-title,
	.bookacti-group-of-events-title	{ max-width: 82px; }
}

@media screen and ( max-width: 820px ) {
	#bookacti-template-container .fc-header-toolbar                  { flex-direction: column; }
	#bookacti-template-container .fc-toolbar-chunk                   { text-align: center; margin-bottom: 1.5em; }
	#bookacti-template-container .fc-toolbar-chunk:nth-child(1),
	.rtl #bookacti-template-container .fc-toolbar-chunk:nth-child(1) { text-align: center; }
	#bookacti-template-container .fc-toolbar-chunk:nth-child(3),
	.rtl #bookacti-template-container .fc-toolbar-chunk:nth-child(3) { text-align: center; margin-bottom: 0; }
}

@media screen and ( max-width: 782px ) {
	input[type=checkbox].bookacti-event-action-select-checkbox:checked:before      { width: 20px; height: 20px; margin: -3px 0 0 -4px !important; }
	.rtl input[type=checkbox].bookacti-event-action-select-checkbox:checked:before { margin: -3px -2px 0 0 !important; }
}

/* Smartphone and small tablets */
@media screen and ( max-width: 564px ) {
	/* Put template sidebar under calendar */
	#bookacti-template-container {
		display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex;
		-webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
		-webkit-box-align: start; -moz-box-align: start; -ms-flex-align: start; -webkit-align-items: flex-start; align-items: flex-start;
	}
	#bookacti-template-sidebar, 
	#bookacti-template-content,
	.rtl #bookacti-template-sidebar, 
	.rtl #bookacti-template-content	{ display: block; padding: 0; margin: 20px 0 0 0; border: none; width: 100%; }
	#bookacti-template-sidebar	{ margin-top: 20px; -webkit-box-ordinal-group: 2; -moz-box-ordinal-group: 2; -ms-flex-order: 2; -webkit-order: 2; order: 2; }
	#bookacti-template-content	{ -webkit-box-ordinal-group: 1; -moz-box-ordinal-group: 1; -ms-flex-order: 1; -webkit-order: 1; order: 1; }
}