/** Editor ********************************************************************/

body.sugar-calendar #post-body-content {
	margin-bottom: 0;
}

#ui-datepicker-div {
	display: none;
}

.sugar-calendar-editor #wp-content-editor-tools {
	background-color: #fff;
	padding-top: 0;
}

#above_event_editor-sortables {
	margin-top: 20px;
}

.event-date,
.event-time,
.event-time-zone {
	display: inline-block;
	padding: 4px 0;
	vertical-align: middle;
}
.sugar_calendar_datepicker {
	max-width: 105px;
	height: 30px;
}
.sugar_calendar_datepicker:after {
	display: inline-block;
    font: normal 20px/34px 'dashicons';
    color: #000;
    speak: none;
	vertical-align: top;
	text-align: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 34px;
    height: 34px;
	content: "\f508";
}
.event-time input {
	max-width: 50px;
}

body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone select:not(.sc-select-chosen),
body.sugar-calendar.js div.sugar-calendar-wrap div.event-time-zone div.sc-select-chosen {
	min-width: 222px;
}

/* Calendars Taxonomy */

#sc_event_categorydiv .inside {
	padding-bottom: 0;
}

#sc_event_category-adder {
	margin: 0 -12px;
}

#sc_event_category-add-toggle {
	font-weight: normal;
	font-size: 13px;
	text-decoration: none;
	margin: 0 0 -1px 13px;
	padding: 5px 10px;
	border: 1px solid #c3c4c7;
	border-bottom: 1px solid #f6f7f7;
	background: #f6f7f7;
	z-index: 2;
	border-top-left-radius: 3px;
	border-top-right-radius: 3px;
}

#sc_event_category-adder.wp-hidden-children #sc_event_category-add-toggle {
	border-bottom: 1px solid #c3c4c7;
}

#sc_event_category-add {
	background: #f6f7f7;
	border-top: 1px solid #c3c4c7;
	padding: 13px 13px 13px 13px;
	margin: 0;
	z-index: 1;
}

#sc_event_category-clear {
	position: absolute;
	top: 0;
	right: 0;
}

#sc_event_category-all {
	position: relative;
	margin: 10px 0;
}

#sc_event_categorychecklist {
	margin: 0;
}

@media only screen and ( max-width: 782px ) {

	.event-time input,
	.event-time select:not(.sc-select-chosen),
	.event-time div.sc-select-chosen {
		max-width: 100px !important;
		display: inline-block !important;
	}

	.sugar_calendar_datepicker {
		height: auto;
	}
}

/** Edit & Rows ***************************************************************/

.widefat .column-start,
.widefat .column-end,
.widefat .column-duration {
	width: 15%
}

.widefat .column-repeat {
	width: 12%;
}

/** Common ********************************************************************/

body.sugar-calendar .wp-filter {
	margin-bottom: 5px;
}

.tablenav.top input[type="number"] {
	width: 80px;
	height: 30px;
	vertical-align: middle;
}

body.sugar-calendar .tablenav .tablenav-pages,
body.sugar-calendar .tablenav .tablenav-tools {
	float: right;
	margin-bottom: 5px;
}

body.sugar-calendar .tablenav .tablenav-pages > *,
body.sugar-calendar .tablenav .tablenav-tools > * {
	margin: 0;
	display: inline-block;
}

body.sugar-calendar .tablenav a.screen-options {
	padding: 0;
	text-decoration: none;
	text-align: center;
}
body.sugar-calendar .tablenav a.screen-options .dashicons {
	color: #b4b9be;
	padding: 5px;
	vertical-align: middle;
	margin-top: -3px;
}
body.sugar-calendar .tablenav a.screen-options:hover .dashicons {
	color: #727272;
}
body.sugar-calendar .tablenav .tablenav-tools > span {
	padding: 6px 10px;
}

body.sugar-calendar .view-switch .view-list:before {
	content: '\f214';
}

.view-switch .view-month:before {
	content: '\f508';
	font-size: 23px;
	margin-top: -3px;
	font-weight: 500;
	-webkit-font-smoothing: subpixel-antialiased;
}

.view-switch .view-week:before {
	content: '\f164';
}

.view-switch .view-day:before {
	content: '\f163';
}

.view-switch a.current {
	background-color: #2271b1;
	border-radius: 3px;
}

.view-switch a.current:before {
	color: #fff;
}

/* Color schemes */
body.admin-color-fresh .view-switch a.current {
	background-color: #2271b1;
}
body.admin-color-blue .view-switch a.current {
	background-color: #096484;
}
body.admin-color-coffee .view-switch a.current {
	background-color: #c7a589;
}
body.admin-color-ectoplasm .view-switch a.current {
	background-color: #a3b745;
}
body.admin-color-midnight .view-switch a.current {
	background-color: #e14d43;
}
body.admin-color-modern .view-switch a.current {
	background-color: #3858e9;
}
body.admin-color-ocean .view-switch a.current {
	background-color: #9ebaa0;
}
body.admin-color-sunrise .view-switch a.current {
	background-color: #dd823b;
}
body.admin-color-light .view-switch a.current {
	background-color: #04a4cc;
}
body.admin-color-bbp-evergreen .view-switch a.current {
	background-color: #36533f;
}
body.admin-color-bbp-mint .view-switch a.current {
	background-color: #4f6d59;
}

table.calendar:not(.list) {
	table-layout: fixed;
	-webkit-touch-callout: none; /* iOS Safari */
	-webkit-user-select: none; /* Safari */
	-khtml-user-select: none; /* Konqueror HTML */
	-moz-user-select: none; /* Firefox */
	-ms-user-select: none; /* Internet Explorer/Edge */
	user-select: none; /* Non-prefixed version */
}

table.calendar:not(.list) thead th,
table.calendar:not(.list) tfoot th {
	text-align: center;
}

table.calendar.striped > tbody > :nth-child(even) td {
	background-color: #fff;
}
table.calendar.striped > tbody > :nth-child(odd) td {
	background-color: #f9f9f9;
}

table.calendar:not(.list) tbody td {
	padding: 0;
	position: relative;
	text-align: left;
	border-bottom: 1px solid #e1e1e1;
	border-right: 1px solid #e1e1e1;
}

table.calendar:not(.day) tbody td.saturday,
table.calendar:not(.day) tbody td.sunday {
	background-color: #f1f1f1;
}

table.calendar:not(.list) tbody td:hover {
	box-shadow: inset 0 0 0 1px #ccc !important;
}

table.calendar a.sugar-calendar,
table.calendar.list strong.status-trash {
	display: block;
	-o-text-overflow: ellipsis;
	text-overflow:    ellipsis;
	overflow-x: hidden;
	white-space: nowrap;
	margin: 0;
	padding: 0 5px;
}

table.calendar a.sugar-calendar,
table.calendar.list strong.status-trash {
	position: relative;
	padding: 0 0 0 20px;
}

table.calendar a.sugar-calendar:before,
table.calendar.list strong.status-trash:before {
	font: normal 15px/18px 'dashicons';
	display: inline-block;
	position: absolute;
	left: 2px;
	top: 0.5px;
	speak: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	width: 18px;
	height: 18px;
	margin: 0;
}

table.calendar.list a.sugar-calendar,
table.calendar.list strong.status-trash {
	display: inline;
	border-radius: 3px;
	padding: 5px 5px 5px 22px;
}

table.calendar.list a.sugar-calendar:before,
table.calendar.list strong.status-trash:before {
	top: 4.5px;
	left: 5px;
}

table.calendar.list .row-actions {
	margin-left: 5px;
	margin-top: 2px;
}

.wp-pointer.sugar-calendar .wp-pointer-arrow {
	left: calc( 50% - 15px );
}

.wp-pointer.sugar-calendar .wp-pointer-arrow-inner {
	border-top-color: #f4f4f4;
}

.wp-pointer-content h3.type-sc_event:before,
table.calendar a.type-sc_event:before {
	content: '\f145';
}

.wp-pointer-content h3.type-post:before,
table.calendar a.type-post:before {
	content: '\f109';
}

.wp-pointer-content h3.type-page:before,
table.calendar a.type-page:before {
	content: '\f105';
}

.wp-pointer-content h3.has-location:before,
table.calendar a.has-location:before {
	content: "\f230";
}

.wp-pointer-content h3.all-day:before,
table.calendar a.all-day:before {
	content: '\f469';
}

.wp-pointer-content h3.status-trash:before,
table.calendar a.status-trash:before,
table.calendar.list strong.status-trash:before {
	content: '\f182';
}

.wp-pointer-content h3.status-private:before,
table.calendar a.status-private:before {
	content: '\f530';
}

.wp-pointer-content h3.post-password-required:before,
table.calendar a.post-password-required:before {
	content: '\f315';
}

.wp-pointer.sugar-calendar .wp-pointer-content p strong,
.wp-pointer.sugar-calendar .wp-pointer-content p span {
	display: block;
}

.wp-pointer.sugar-calendar .wp-pointer-content p span {
	margin-bottom: 20px;
}

.wp-pointer.sugar-calendar .wp-pointer-actions {
	border-top: 1px solid #ddd;
	background-color: #f4f4f4;
	padding: 12px 10px 14px;
	margin: 0 0 -38px;
	min-height: 19px;
}

.wp-pointer.sugar-calendar .wp-pointer-actions .action {
	position: relative;
	margin: 0;
	padding: 0 5px;
}

.wp-pointer.sugar-calendar .wp-pointer-actions .action:first-child {
	margin-left: 10px;
	padding-left: 0;
}

.wp-pointer.sugar-calendar .wp-pointer-actions .action:not(:last-child) {
	border-right: 1px solid #dcdcde;
}

.wp-pointer.sugar-calendar .wp-pointer-actions .action a {
	text-decoration: none;
}

.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a {
	color: #dc3232;
}

.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:hover,
.wp-pointer.sugar-calendar .wp-pointer-actions .event-delete a:active {
	color: #a00;
}

.wp-pointer.sugar-calendar .wp-pointer-buttons a.close {
	color: #aaa;
}

.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:hover,
.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:active {
	color: #bbb;
}

.wp-pointer.sugar-calendar .wp-pointer-buttons a.close:before {
	display: none !important;
}

table.calendar:not(.draft) a.status-draft,
table.calendar:not(.trash) a.status-trash,
table.calendar:not(.trash) strong.status-trash {
	opacity: 0.5;
}

@media screen and ( max-width: 782px ) {

	body.sugar-calendar .tablenav-pages {
		float: right;
		text-align: right;
		margin: 7px 0 0 0;
		width: auto;
	}

	/* Override list-tables.css */
	table.calendar:not(.list) #the-list tr:last-child td:not(:last-child) {
		border-bottom: 1px solid #e1e1e1 !important;
	}

	/* @hotfix WordPress 5.4 */
	table.calendar:not(.list) tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.check-column) {
		display: block;
	}
	table.calendar.list tr:not(.inline-edit-row):not(.no-items):not(.unspam):not(.untrash) td:not(.column-primary)::before {
		left: 32px;
	}
}

/** Month *********************************************************************/

table.month tbody td a.day-number,
table.month tbody td a.add-event-for-day {
	padding: 0;
	margin: 0;
	position: absolute;
	top: 0px;
	height: 26px;
	width: 26px;
	text-align: center;
	color: #aaa;
	line-height: 1.9em;
	font-weight: 600;
	background-color: rgba(255, 255, 255, 0.8);
	border: 1px solid transparent;
	border-bottom: 1px solid #e1e1e1;
}

table.month tbody td a.day-number {
	border-right: 1px solid #e1e1e1;
	border-bottom-right-radius: 5px;
}

table.month tbody td a.add-event-for-day {
	border-left: 1px solid #e1e1e1;
	right: 0;
	visibility: hidden;
}

table.month tbody td a.add-event-for-day:hover,
table.month tbody td a.day-number:hover {
	background: rgba(245, 245, 245, 0.8);
}

table.month tbody td:hover a.add-event-for-day {
	visibility: visible;
}

table.month tbody td:hover a.day-number,
table.month tbody td:hover a.add-event-for-day {
	border-color: #ccc;
}

table.month tbody td {
	position: relative;
}

table.month tbody th {
	height: 80px;
	background-color: #fff;
	border-bottom: 1px solid #e1e1e1;
}

table.month tbody tr th:last-of-type {
	border-right: 1px solid #e1e1e1;
}

table.month tbody tr td:nth-child(8) {
	border-right: none;
}

table.calendar.month tbody td.today {
	background: #ffe;
}

table.month div.events-for-cell {
	margin: 30px 0 5px;
	min-height: 80px;
}

table.month tbody td a i {
	line-height: 1.9em;
	font-size: 15px;
	overflow: hidden;
}

table.month th.column-week {
	border-right: 1px solid #e1e1e1;
}

table.month tbody th.column-week {
	border-bottom: none;
	background-color: #fff;
	position: relative;
	text-align: center;
	z-index: 1;
}

table.month tbody th.column-week a {
	margin: auto auto;
	padding: 10px;
	border: 1px solid transparent;
	border-radius: 5px;
	font-weight: 600;
	color: #aaa;
	background-color: rgba(255, 255, 255, 0.8);
	z-index: 3;
}

table.month tbody th.column-week a:hover {
	background-color: #f1f1f1;
	border: 1px solid #e1e1e1;
}

.wp-pointer-content h3 a {
	color: #fff;
	text-decoration: none;
}

.wp-pointer-content h3 a:hover {
	color: #eee;
}

input#year {
	width: 90px;
}

@media screen and ( max-width: 782px ) {
	table.month div.events-for-cell {
		margin: 0;
		padding-top: 30px;
	}

	table.month tbody th.padding {
		display: none;
	}

	table.month tbody td {
		border-width: 0 0 1px 0 !important;
		padding: 0;
		margin: 0;
	}
}

/** Week/Day ******************************************************************/

table.week th,
table.day th,
table.week td div.events-for-cell,
table.day td div.events-for-cell {
	min-height: 34px;
	position: relative;
}

table.week th,
table.day th {
	width: 30px;
	background-color: #fff;
	color: #333;
	border-bottom: 1px solid #e1e1e1;
	border-right: 1px solid #e1e1e1;
	text-align: center;
	cursor: default;
}

table.week thead tr th:last-of-type,
table.day thead tr th:last-of-type,
table.week tfoot tr th:last-of-type,
table.day tfoot tr th:last-of-type,
table.week tbody tr td:last-of-type,
table.day tbody tr td:last-of-type {
	border-right: none;
}

table.week thead tr th:not(:first-child),
table.day thead tr th:not(:first-child),
table.week tfoot tr th:not(:first-child),
table.day tfoot tr th:not(:first-child) {
	border-right: none;
}

table.week tfoot tr:last-of-type th,
table.day tfoot tr:last-of-type th {
	border-bottom: none;
}

table.week tbody tr:not(.multi-day) th:first-of-type,
table.day tbody tr:not(.multi-day) th:first-of-type {
	border-bottom: none;
}

table.calendar.day tr.multi-day td,
table.calendar.day tr.all-day td,
table.calendar.week tr.multi-day td,
table.calendar.week tr.all-day td {
	background-color: #efe;
}

table.calendar.week tbody tr.this-hour td,
table.calendar.day tbody tr.this-hour td {
	background: #ffe;
}

table.week tr.multi-day th,
table.week tr.multi-day td,
table.day tr.multi-day th,
table.day tr.multi-day td {
	border-bottom: 2px solid #e1e1e1;
}

table.week th.column-hour,
table.day th.column-hour {
	width: 110px;
}

table.week th.column-monday,
table.week th.column-tuesday,
table.week th.column-wednesday,
table.week th.column-thursday,
table.week th.column-friday,
table.week th.column-saturday,
table.week th.column-sunday,
table.day th.column-monday,
table.day th.column-tuesday,
table.day th.column-wednesday,
table.day th.column-thursday,
table.day th.column-friday,
table.day th.column-saturday,
table.day th.column-sunday {
	width: 100%;
}

table.week th.manage-column,
table.day th.manage-column {
	padding: 0;
	vertical-align: top;
}

table.week th.manage-column a,
table.week th.manage-column span,
table.day th.manage-column a,
table.day th.manage-column span {
	padding: 8px 10px;
	color: #32373c;
	display: block;
	height: calc(100% - 16px);
	width: calc(100% - 21px);
	-o-text-overflow: ellipsis;
	text-overflow:    ellipsis;
	overflow-x: hidden;
	white-space: nowrap;
}

table.week th.manage-column a:hover,
table.week th.manage-column a:active,
table.day th.manage-column a:hover,
table.day th.manage-column a:active {
	opacity: 0.5;
}

@media screen and ( max-width: 782px ) {

	table.week tr.multi-day th,
	table.week tr.multi-day td,
	table.day tr.multi-day th,
	table.day tr.multi-day td {
		border-bottom: 1px solid #e1e1e1;
	}

	table.week th.column-monday,
	table.week th.column-tuesday,
	table.week th.column-wednesday,
	table.week th.column-thursday,
	table.week th.column-friday,
	table.week th.column-saturday,
	table.week th.column-sunday,
	table.day th.column-monday,
	table.day th.column-tuesday,
	table.day th.column-wednesday,
	table.day th.column-thursday,
	table.day th.column-friday,
	table.day th.column-saturday,
	table.day th.column-sunday {
		display: block;
		width: auto;
	}

	table.week thead th:nth-child(n+3),
	table.day thead th:nth-child(n+3),
	table.week tfoot th:nth-child(n+3),
	table.day tfoot th:nth-child(n+3) {
		border-top: none;
	}

	table.week tr:not(.inline-edit-row):not(.no-items) td:not(.check-column),
	table.day tr:not(.inline-edit-row):not(.no-items) td:not(.check-column) {
		min-height: 35px;
	}

	/* Always hide week columns on small screens */
	table.month th.column-week {
		display: none;
	}
}

table.list span.sc-timechange,
table.list span.sc-timezone,
.tablenav-tools span.sc-timezone,
.wp-pointer-content span.sc-timezone {
	font-size: 11px;
	color: rgba(0, 0, 0, 0.4);
}

/** Screen Options ************************************************************/

body.sugar-calendar form#adv-settings .metabox-prefs label {
	display: block;
	margin-top: -8px;
	margin-left: 200px;
}

body.sugar-calendar form#adv-settings .metabox-prefs legend + label {
	margin-top: -30px;
}

body.sugar-calendar form#adv-settings .metabox-prefs {
	margin-bottom: 10px;
}

body.sugar-calendar form#adv-settings table.form-table {
	margin: 0;
	padding: 0;
}

body.sugar-calendar form#adv-settings table.form-table * {
	font-size: 13px;
	line-height: 1.5em;
}

body.sugar-calendar form#adv-settings table.form-table td,
body.sugar-calendar form#adv-settings table.form-table th {
	padding: 10px 0;
}

body.sugar-calendar form#adv-settings .sc-date-time-prefs td label {
	padding: 2px 0 2px 0;
}

body.sugar-calendar form#adv-settings .sc-date-time-prefs span.date-time-text {
	display: inline-block;
	min-width: 10em;
}

body.sugar-calendar form#adv-settings .sc-date-time-prefs input.small-text {
	width: 75px;
	margin: -2px 0;
}
