/* bookaVanced Plugin Styles */

/* Admin input fields */
#reservation_time,
#reservation_date,
#reservation_persons,
#reservation_name,
#reservation_surname,
#reservation_email,
#reservation_comment {
	width: 100%;
}

/* Hide posts filter in interactive view */
#posts-filter.hidden {
	display: none;
}

/* View Switch Styles */
.view-switch {
	margin: 8px 0;
	display: inline-block;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
}

.view-switch a {
	padding: 4px 12px;
	text-decoration: none;
	display: inline-block;
	box-shadow: none;
	white-space: nowrap;
	width: max-content;
}

.view-switch a.current {
	background-color: #2271b1;
	color: #fff;
	font-weight: bold;
	cursor: default;
}

.view-switch a:not(.current) {
	background-color: #f6f7f7;
}

/* Admin Calendar Styles */
.calendar-view-toggle {
	display: inline-block;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
	margin-left: 15px;
}

.calendar-view-toggle a {
	padding: 4px 12px;
	text-decoration: none;
	display: inline-block;
	box-shadow: none;
	border: none;
}

.calendar-view-toggle a.current {
	background-color: #2271b1;
	color: #fff;
	font-weight: bold;
	cursor: default;
}

.calendar-view-toggle a:not(.current) {
	background-color: #f6f7f7;
}

.calendar-wrap {
	margin-top: 20px;
}

.calendar-nav {
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 15px;
}

.calendar-nav .button {
	font-size: 14px;
}

.calendar-nav h2 {
	margin: 0;
	font-size: 20px;
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	border-left: 1px solid #ccd0d4;
	border-top: 1px solid #ccd0d4;
}

.calendar-day {
	border-right: 1px solid #ccd0d4;
	border-bottom: 1px solid #ccd0d4;
	min-height: 150px;
	background: #fff;
}

.calendar-day.not-in-month {
	background: #f9f9f9;
}

.calendar-day.fully-closed {
	background-color: #eceff1;
	cursor: not-allowed;
}

.calendar-day.fully-closed .day-header {
	background-color: #cfd8dc;
}

.calendar-day.booked-out {
	background-color: #fff3e0;
}

.calendar-day.booked-out .day-header {
	background-color: #ffe0b2;
}

.calendar-day.clickable {
	cursor: pointer;
}

/* Admin calendar hover effect only */
.calendar-wrap .calendar-day.clickable:hover {
	box-shadow: inset 0 0 0 2px #2271b1;
}

/* Remove hover border effect for frontend calendar */
.bookavanced-frontend-calendar .calendar-day.clickable:hover {
	box-shadow: none;
}

.day-header {
	position: relative;
	padding: 8px;
	background: #f0f0f1;
	border-bottom: 1px solid #ccd0d4;
}

.day-header .day-status-hint {
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: 11px;
	color: #c62828;
	font-weight: bold;
	text-align: right;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 60px;
}

.day-header .day-status-hint span {
	display: block;
	background: rgba(255, 255, 255, 0.9);
	padding: 1px 4px;
	border-radius: 2px;
	line-height: 1.2;
	word-wrap: break-word;
	font-size: 10px;
	border: 1px solid rgba(198, 40, 40, 0.3);
}

.day-content {
	padding: 8px;
}

.day-summaries {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.summary-item {
	background: #eef6ff;
	border-left: 4px solid #78b9eb;
	padding: 8px;
	border-radius: 3px;
}



.summary-item div {
	font-size: 14px;
	line-height: 1.4;
}

.summary-item strong {
	font-size: 18px;
}

.overbooked-warning {
	font-weight: bold;
	color: #d84315;
	text-align: center;
	padding-top: 10px;
}

.event-notice {
	display: block;
	background: rgba(255, 255, 255, 0.9);
	padding: 1px 4px;
	border-radius: 2px;
	line-height: 1.2;
	word-wrap: break-word;
	font-size: 10px;
	border: 1px solid rgba(198, 40, 40, 0.3);
	font-weight: bold;
	color: #c62828;
	text-align: center;
	margin: 20px auto 0;
	width: fit-content;
}

.closed-notice {
	display: block;
	background: rgba(255, 255, 255, 0.9);
	padding: 1px 4px;
	border-radius: 2px;
	line-height: 1.2;
	word-wrap: break-word;
	font-size: 10px;
	border: none;
	font-weight: bold;
	color: #c62828;
	text-align: center;
	margin: 20px auto 0;
	width: fit-content;
}



/* Admin Modal Styles */
.reservation-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.6);
	z-index: 1050;
	display: none;
}

.reservation-modal-content {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	padding: 20px 30px;
	border-radius: 5px;
	width: 600px;
	max-width: 90%;
	z-index: 1051;
}

.reservation-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #ddd;
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.reservation-modal-header h3 {
	margin: 0;
	font-size: 20px;
}

.reservation-modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
}

.reservation-modal-body .location-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
	max-height: 60vh;
	overflow-y: auto;
	padding: 10px;
	background: #f9f9f9;
	border-radius: 4px;
}

.reservation-modal-body .location-column {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.reservation-modal-body .location-header {
	background: #f0f0f1;
	padding: 8px 12px;
	font-weight: bold;
	border-bottom: 1px solid #e0e0e0;
}

.reservation-modal-body ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.reservation-modal-body .location-column li {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
}

.reservation-modal-body .location-column li:last-child {
	border-bottom: none;
}

.reservation-modal-body .reservation-entry {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.reservation-modal-body .reservation-details {
	flex-grow: 1;
}

.reservation-modal-body .reservation-actions {
	text-align: right;
	white-space: nowrap;
	margin-left: 10px;
}

.reservation-modal-body .no-reservations {
	padding: 20px;
	text-align: center;
	color: #777;
	font-style: italic;
}

.reservation-modal-body .person-name {
	font-weight: 600;
	display: block;
}

.reservation-modal-body .person-count {
	background: #f0f0f1;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 12px;
}

.reservation-modal-footer {
	border-top: 1px solid #ddd;
	padding-top: 15px;
	margin-top: 20px;
	text-align: right;
}

body.modal-open {
	overflow: hidden;
}

/* Frontend Calendar Styles */
.bookavanced-frontend-calendar .calendar-wrap {
	margin-top: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.bookavanced-frontend-calendar .calendar-nav {
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.bookavanced-frontend-calendar .calendar-nav a {
	padding: 8px 16px;
	text-decoration: none;
	background: #D0CFCA;
	border: 1px solid #D0CFCA;
	border-radius: 6px;
	color: black;
	font-weight: 500;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bookavanced-frontend-calendar .calendar-nav a:hover {
	background: #BFB9B2;
	border-color: #BFB9B2;
	transform: translateY(-1px);
	box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.bookavanced-frontend-calendar .calendar-nav h2 {
	margin: 0;
	font-size: 20px;
}

@media screen and (max-width: 991px)
{
	.bookavanced-frontend-calendar .calendar-grid {
		display: grid;
		grid-template-columns: repeat(1, 1fr) !important;
	}
}

.bookavanced-frontend-calendar .calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	border-left: 1px solid #ccd0d4;
	border-top: 1px solid #ccd0d4;
}

.bookavanced-frontend-calendar .calendar-day {
	border-right: 1px solid #ccd0d4;
	border-bottom: 1px solid #ccd0d4;
	min-height: 100px;
	background: #fff;
	position: relative;
}

.bookavanced-frontend-calendar .day-header {
	padding: 8px;
	background: #f4f4f4;
	font-size: 12px;
}

.bookavanced-frontend-calendar .day-header strong {
	font-size: 14px;
	display: block;
}

.bookavanced-frontend-calendar .calendar-day.not-in-month {
	background: #fff;
}

.bookavanced-frontend-calendar .calendar-day.not-in-month .day-header {
	background-color: #f4f4f4;
}

.bookavanced-frontend-calendar .calendar-day.closed-day {
	background-color: #fff;
	cursor: not-allowed;
}

.bookavanced-frontend-calendar .calendar-day.closed-day .day-header {
	background-color: #D0CFCA;
}

.bookavanced-frontend-calendar .calendar-day.booked-out {
	background-color: #fff;
	cursor: not-allowed;
}

.bookavanced-frontend-calendar .calendar-day.booked-out .day-header {
	background-color: #f4f4f4;
}

.bookavanced-frontend-calendar .calendar-day.clickable {
	cursor: default;
}

.bookavanced-frontend-calendar .calendar-day.clickable .day-header {
	cursor: pointer;
}

.bookavanced-frontend-calendar .calendar-day.clickable .day-header:hover {
	background-color: #e0e0e0;
}

.bookavanced-frontend-calendar .closed-notice {
	font-size: 11px;
	color: grey;
	text-align: center;
	margin-top: 5px;
	line-height: 1.2;
	font-weight: bold;
}

.bookavanced-frontend-calendar .event-notice {
	display: flex;
	flex-direction: column;
	background: #c62828;
	padding: 10px;
	border-radius: 4px;
	line-height: 1.2;
	word-wrap: break-word;
	font-size: 10px;
	border: none;
	font-weight: bold;
	color: #fff;
	text-align: center;
	margin: 20px auto 0;
	margin-bottom: 5px;
	width: 95%;
	margin-left: 0;
	margin-right: 1px;
	min-width: 60px;
	max-width: 95%;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease;
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 5px !important;
}

.bookavanced-frontend-calendar .event-notice:hover {
	background: #d32f2f;
}

.bookavanced-frontend-calendar .event-notice .event-link {
	color: inherit;
	text-decoration: none;
	font-weight: inherit;
	display: block;
	width: 100%;
	height: 100%;
}

.bookavanced-frontend-calendar .event-notice .event-link:hover {
	color: inherit;
	text-decoration: none;
}

.bookavanced-frontend-calendar .partial-status-notice {
	font-size: 11px;
	color: #b93232;
	text-align: center;
	margin-top: 5px;
	line-height: 1.2;
}

.bookavanced-frontend-calendar .partial-status-notice.addin-partial-closed {
	font-size: 11px;
	color: grey;
	text-align: center;
	margin-top: 5px;
	line-height: 1.2;
}

/* Additional styles for select and location headers */
#reservation_location {
	width: 100%;
}

.location-list-header {
	font-weight: bold;
	font-size: 12px;
	border-bottom: 1px solid #ddd;
	margin-bottom: 4px;
	padding-bottom: 2px;
}

#opening-times-hint {
	margin-top: 5px;
	display: block;
}

#opening-times-hint.hidden {
	display: none;
}

/* Frontend Modal Styles */
.bookavanced-modal-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.6);
	z-index: 10000;
}

.bookavanced-modal-content {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	padding: 20px 30px;
	border-radius: 5px;
	width: 400px;
	max-width: 90%;
	z-index: 10001;
	max-height: 90vh;
	overflow: scroll;
}

.bookavanced-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #ddd;
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.bookavanced-modal-close {
	font-size: 24px;
	cursor: pointer;
	border: none;
	background: none;
}

#reservation-modal-title {
	text-align: center;
}

.bookavanced-modal-body p {
	margin-bottom: 15px;
}

.bookavanced-modal-body label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
	text-align: center;
}

.bookavanced-modal-body input[type="text"],
.bookavanced-modal-body input[type="email"],
.bookavanced-modal-body input[type="tel"],
.bookavanced-modal-body input[type="time"],
.bookavanced-modal-body input[type="number"],
.bookavanced-modal-body select,
.bookavanced-modal-body textarea {
	width: 100%;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.bookavanced-modal-footer {
	text-align: center;
	margin-top: 20px;
}

.bookavanced-modal-footer .submit-reservation {
	padding: 10px 20px;
	background: #b0966b;
	color: white;
	border: 1px solid #b0966b;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 500;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bookavanced-modal-footer .submit-reservation:hover:not(:disabled) {
	background: #9a8359;
	border-color: #9a8359;
	transform: translateY(-1px);
	box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.bookavanced-modal-footer .submit-reservation:disabled {
	background: #999;
	border-color: #999;
	transform: none;
	box-shadow: none;
}

.bookavanced-form-message {
	padding: 10px;
	margin-bottom: 15px;
	border-radius: 4px;
	display: none;
}

.bookavanced-form-message.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.bookavanced-form-message.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}