/**
 * Agent Booking Calendar Styles
 */

/* Modal Overlay */
.latepoint-agent-booking-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
}

.latepoint-agent-booking-modal.active {
	display: flex;
	align-items: center;
	justify-content: center;
}

.latepoint-agent-booking-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}

/* Modal Content */
.latepoint-agent-booking-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	z-index: 1000000;
}

/* Modal Header */
.latepoint-agent-booking-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	border-bottom: 1px solid #e0e0e0;
}

.latepoint-agent-booking-modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.latepoint-agent-booking-modal-close {
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.latepoint-agent-booking-modal-close:hover {
	color: #333;
}

/* Modal Body */
.latepoint-agent-booking-modal-body {
	padding: 20px;
}

.latepoint-agent-booking-section {
	margin-bottom: 20px;
}

.latepoint-agent-booking-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
}

.latepoint-agent-booking-client-select {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
}

/* Select2 custom styles */
.latepoint-agent-booking-modal .select2-container {
	width: 100% !important;
	z-index: 1000001 !important;
}

.latepoint-agent-booking-modal .select2-selection--single {
	height: 42px;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
}

.latepoint-agent-booking-modal .select2-selection__rendered {
	line-height: 24px;
	padding: 0;
}

.latepoint-agent-booking-modal .select2-selection__arrow {
	height: 40px;
}

.latepoint-agent-booking-modal .select2-dropdown {
	border: 1px solid #ddd;
	border-radius: 4px;
	z-index: 1000002 !important;
}

.latepoint-agent-booking-modal .select2-search--dropdown {
	padding: 10px;
}

.latepoint-agent-booking-modal .select2-search--dropdown .select2-search__field {
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	width: 100%;
}

.latepoint-agent-booking-modal .select2-results__option {
	padding: 8px 10px;
}

.latepoint-agent-booking-modal .select2-results__option--highlighted {
	background: #0073aa;
	color: #fff;
}

.latepoint-agent-booking-modal .select2-container--open .select2-selection--single {
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

/* Ensure Select2 dropdown is above modal */
.select2-container--open {
	z-index: 1000002 !important;
}

.latepoint-agent-booking-loading {
	padding: 10px;
	color: #666;
	font-style: italic;
}

/* Create Customer Form */
.latepoint-create-customer-form {
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
}

.latepoint-create-customer-form h4 {
	margin: 0 0 15px;
	font-size: 16px;
	color: #333;
}

.latepoint-form-row {
	display: flex;
	gap: 15px;
	margin-bottom: 15px;
}

.latepoint-form-group {
	flex: 1;
}

.latepoint-form-group label {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	color: #666;
}

.latepoint-form-group input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.latepoint-form-group input:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

/* Customer Details */
.latepoint-customer-details {
	margin: 20px 0;
	padding: 15px;
	background: #f0f7ff;
	border-radius: 4px;
}

.latepoint-customer-info {
	font-size: 14px;
	line-height: 1.6;
}

.latepoint-customer-info strong {
	color: #333;
}

/* Booking Summary */
.latepoint-booking-summary {
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.8;
}

.latepoint-booking-summary div {
	margin-bottom: 5px;
}

/* Booking Message */
.latepoint-booking-message {
	padding: 12px;
	border-radius: 4px;
	margin-top: 15px;
	font-size: 14px;
}

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

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

/* Modal Footer */
.latepoint-agent-booking-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 15px 20px;
	border-top: 1px solid #e0e0e0;
}

.latepoint-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.latepoint-btn-secondary {
	background: #f0f0f0;
	color: #333;
}

.latepoint-btn-secondary:hover {
	background: #e0e0e0;
}

.latepoint-btn-primary {
	background: #0073aa;
	color: #fff;
}

.latepoint-btn-primary:hover {
	background: #005a87;
}

.latepoint-btn-primary:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Calendar Service Box Modifications */
.latepoint-agent-booking-calendar .le-service-wrapper {
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}

.latepoint-agent-booking-calendar .le-service-wrapper:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Body class when modal is open */
body.latepoint-modal-open {
	overflow: hidden;
}

/* Responsive */
@media (max-width: 600px) {
	.latepoint-agent-booking-modal-content {
		width: 95%;
	}

	.latepoint-form-row {
		flex-direction: column;
		gap: 10px;
	}

	.latepoint-agent-booking-modal-footer {
		flex-direction: column;
	}

	.latepoint-btn {
		width: 100%;
	}
}

/* Order Summary Section (APAK 18.03.2026) */
.latepoint-order-summary-section {
	background: #f8f9fa;
	padding: 15px;
	border-radius: 6px;
	margin-top: 15px;
}

.latepoint-order-summary-section h4 {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

.latepoint-order-summary {
	background: #fff;
	padding: 10px;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
}

.order-summary-row {
	display: flex;
	justify-content: space-between;
	padding: 5px 0;
	font-size: 14px;
}

.order-summary-row:not(:last-child) {
	border-bottom: 1px solid #eee;
}

.order-total-row {
	margin-top: 5px;
	padding-top: 10px;
	border-top: 2px solid #333 !important;
	font-size: 16px;
}

.order-subtotal,
.order-discount,
.order-total {
	font-weight: 500;
}

.latepoint-discount-row {
	color: #28a745;
}

/* Coupon Section */
.latepoint-coupon-section {
	margin-top: 15px;
}

.latepoint-coupon-section .latepoint-form-group {
	margin-bottom: 0 !important;
}

.latepoint-coupon-section input[type="text"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.latepoint-coupon-section input[type="text"]:focus {
	border-color: #5779ef;
	outline: none;
}

.latepoint-coupon-message {
	margin-top: 8px;
	font-size: 13px;
	padding: 5px 8px;
	border-radius: 4px;
}

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

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

.latepoint-apply-coupon:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Daily View Styles (APAK 18.03.2026) */
.latepoint-calendar-day {
	padding: 20px;
}

.latepoint-calendar-day-header {
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #eee;
}

.latepoint-day-date {
	font-size: 24px;
	font-weight: 600;
	color: #333;
}

.latepoint-calendar-day-slots {
	position: relative;
	background: #f9f9f9;
	padding: 15px;
	padding-left: 110px; /* Space for time labels */
	border-radius: 8px;
	overflow: hidden;
}

.latepoint-calendar-day-slots .day-schedule-timeslots {
	width: 100%;
	position: relative;
}

.latepoint-calendar-day-slots .day-schedule-timeslots:before {
	content: "";
	top: 0;
	bottom: 0;
	width: 1px;
	background-color: #e1e1e1;
	position: absolute;
	left: 0;
}

.latepoint-calendar-day-slots .day-schedule-timeslot-wrapper {
	display: flex;
	background-color: #f9f9f9;
}

.latepoint-calendar-day-slots .day-schedule-timeslot-wrapper:first-child .day-schedule-timeslot-value {
	display: none;
}

.latepoint-calendar-day-slots .day-schedule-timeslot-wrapper:first-child .day-schedule-timeslot:before {
	background-color: rgba(0, 0, 0, 0);
}

.latepoint-calendar-day-slots .day-schedule-timeslot {
	flex: 1;
	text-align: right;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 11px;
	height: 44px;
	position: relative;
	box-shadow: 0 1px 0 0 #ddd;
}

.latepoint-calendar-day-slots .day-schedule-timeslot .day-schedule-timeslot-value {
	position: absolute;
	top: 0;
	transform: translateY(-50%);
	left: -100px;
	width: 90px;
	text-align: right;
	color: #666;
}

/* Service boxes in daily view - same as weekly */
.latepoint-calendar-day-slots .le-service-wrapper {
	position: absolute;
	left: 100px;
	right: 0;
	font-size: 12px;
	background-color: #fff;
	z-index: 2;
	cursor: pointer;
	box-shadow: inset 0 1px 0 0px #ddd, 0 3px 0 0 rgba(0, 0, 0, 0.03);
	border-bottom: 1px solid #ccc;
}

.latepoint-calendar-day-slots .le-service-wrapper:hover {
	opacity: 1;
	z-index: 3;
}

.latepoint-calendar-day-slots .le-service-wrapper:hover .le-color-elem {
	width: 5px;
}

.latepoint-calendar-day-slots .le-service-wrapper:hover .le-service-name,
.latepoint-calendar-day-slots .le-service-wrapper:hover .le-service-time-period {
	transform: translateX(3px);
}

.latepoint-calendar-day-slots .le-service-wrapper .le-service-inner {
	padding: 3px;
	padding-left: 8px;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
}

.latepoint-calendar-day-slots .le-service-wrapper .le-color-elem {
	position: absolute;
	top: 0px;
	bottom: -1px;
	left: -1px;
	width: 3px;
	display: block;
	transition: all 0.15s ease;
}

.latepoint-calendar-day-slots .le-service-wrapper .le-service-name {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	overflow: hidden;
	transition: transform 0.15s ease;
}

.latepoint-calendar-day-slots .le-service-wrapper .le-service-time-period {
	transition: transform 0.15s ease;
	font-size: 12px;
	color: #666;
}

.latepoint-calendar-day-slots .le-service-wrapper.is-passed {
	cursor: not-allowed;
}

.latepoint-calendar-day-slots .le-service-wrapper.is-passed .le-service-inner {
	opacity: 0.6;
}

.latepoint-calendar-day-slots .le-service-wrapper.is-passed:hover .is-passed-message {
	display: block;
}

.latepoint-calendar-day-slots .le-service-wrapper.is-passed .is-passed-message {
	display: none;
	background-color: #000;
	color: #fff;
	padding: 5px 10px;
	font-weight: 600;
	font-size: 12px;
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -110%);
	white-space: nowrap;
}

/* Responsive for daily view */
@media (max-width: 768px) {
	.latepoint-calendar-day-slots {
		padding-left: 70px;
	}
	
	.latepoint-calendar-day-slots .day-schedule-timeslot {
		flex: 0 0 60px;
	}
	
	.latepoint-calendar-day-slots .day-schedule-timeslot .day-schedule-timeslot-value {
		left: -70px;
		width: 60px;
	}
	
	.latepoint-calendar-day-slots .le-service-wrapper {
		left: 70px !important;
		right: 10px !important;
	}
}
