// stylelint-disable selector-no-qualifying-type
// stylelint-disable selector-max-compound-selectors
// stylelint-disable selector-max-specificity
// stylelint-disable no-descending-specificity
@import './variables';

.rbc-agenda-view {
	display: flex;
	overflow: auto;
	flex: 1 0 0;
	flex-direction: column;

	table.rbc-agenda-table {
		@include dark-mode {
			border-color: $dark-cell-border;
		}

		width: 100%;
		border: 1px solid $cell-border;
		border-collapse: collapse;
		border-spacing: 0;

		* {
			border: none!important;
		}

		tbody > tr > td {
			padding: ($spacer * 0.5) $spacer;
			vertical-align: top;
		}

		.rbc-agenda-time-cell {
			padding-right: $spacer;
			padding-left: $spacer;
			text-transform: lowercase;
		}

		tbody > tr > td + td {
			@include dark-mode {
				border-left-color: $dark-cell-border;
			}

			border-left: 1px solid $cell-border;
		}

		.rbc-rtl & {
			tbody > tr > td + td {
				@include dark-mode {
					border-right-color: $dark-cell-border;
				}

				border-right: 1px solid $cell-border;
				border-left-width: 0;
			}
		}

		tbody > tr + tr {
			@include dark-mode {
				border-top-color: $dark-cell-border;
			}

			border-top: 1px solid $cell-border;
		}

		thead > tr > th {
			@include dark-mode {
				border-bottom-color: $dark-cell-border;
			}

			padding: $btn-padding-y $btn-padding-x;
			border-bottom: 1px solid $cell-border;
			text-align: left;

			.rbc-rtl & {
				text-align: right;
			}
		}
	}
}

.rbc-agenda-time-cell {
	text-transform: lowercase;

	.rbc-continues-after::after {
		content: ' »';
	}

	.rbc-continues-prior::before {
		content: '« ';
	}
}

.rbc-agenda-date-cell,
.rbc-agenda-time-cell {
	white-space: nowrap;
}

.rbc-agenda-event-cell {
	width: 100%;
}
// stylelint-enable selector-no-qualifying-type
// stylelint-enable selector-max-compound-selectors
// stylelint-enable selector-max-specificity
// stylelint-enable no-descending-specificity
