/**
 * Frontend Styles
 */

.erp-rental-form {
	margin: 30px 0;
	padding: 0;
	border: none;
	background: transparent;
	box-sizing: border-box;
}

.erp-rental-form h3 {
	margin-top: 0;
}

.erp-rental-form .erp-rental-info {
	margin-bottom: 20px;
}

.erp-rental-form .erp-rental-info .erp-cleaning-fee-note,
.erp-rental-form .erp-rental-info .erp-min-rental-time-note {
	margin-top: 10px;
	margin-bottom: 0;
}

.erp-form-row {
	display: flex;
	gap: 15px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.erp-form-field {
	width: 100%;
	margin-bottom: 20px;
	box-sizing: border-box;
}

.erp-form-field label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.erp-form-field input[type="text"],
.erp-form-field input[type="time"],
.erp-form-field input[type="date"] {
	width: 100%;
	max-width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

/* Calendar icon for date inputs */
.erp-datepicker-wrapper {
	position: relative;
	display: block;
	width: 100%;
}

.erp-form-field input.erp-datepicker {
	padding-right: 45px;
	width: 100%;
}

.erp-calendar-icon {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	pointer-events: auto;
	cursor: pointer;
	z-index: 1;
}

.erp-price-summary {
	width: 100%;
	padding: 15px;
	background: #fff;
	border: none;
	border-radius: 4px;
	margin-top: 10px;
}

.erp-price-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

.erp-price-row:last-child {
	border-bottom: none;
}

.erp-price-row.total {
	border-top: 2px solid #333;
	padding-top: 12px;
	margin-top: 8px;
}

.erp-price-row .label {
	font-size: 14px;
}

.erp-price-row .value {
	font-size: 14px;
	font-weight: 600;
}

.erp-price-row .value.discount {
	color: #4caf50;
}

.erp-price-row.erp-vat-note {
	font-size: 12px;
	color: #666;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #eee;
}

.erp-calculate-btn,
.erp-add-to-cart-btn {
	padding: 12px 24px;
	font-size: 16px;
	cursor: pointer;
}

.erp-add-to-cart-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Pricing Table */
.erp-pricing-table {
	margin: 30px 0;
}

.erp-pricing-table h3 {
	margin-bottom: 15px;
}

/* Compact Pricing Table */
.erp-pricing-compact {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	padding: 20px;
}

.erp-pricing-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #f0f0f0;
}

.erp-pricing-header h3 {
	margin: 0;
	font-size: 20px;
}

.erp-pricing-toggle {
	background: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 8px 16px;
	cursor: pointer;
	font-size: 14px;
	color: #666;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: all 0.3s ease;
}

.erp-pricing-toggle:hover {
	background: #f5f5f5;
	border-color: #999;
}

.erp-pricing-toggle[aria-expanded="true"] .erp-toggle-icon {
	transform: rotate(180deg);
}

.erp-toggle-icon {
	transition: transform 0.3s ease;
	font-size: 12px;
}

/* Compact View - Key Pricing Points */
.erp-pricing-compact-view {
	margin-bottom: 15px;
}

.erp-pricing-key-points {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
}

.erp-pricing-key-item {
	padding: 15px;
	background: #f9f9f9;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	text-align: center;
	transition: all 0.3s ease;
	position: relative;
}

.erp-pricing-key-item.has-discount {
	border-color: #4caf50;
	background: #f1f8f4;
}

.erp-pricing-key-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.erp-key-units {
	margin-bottom: 10px;
}

.erp-key-units strong {
	font-size: 24px;
	color: #333;
	display: block;
}

.erp-key-unit-label {
	font-size: 12px;
	color: #666;
	text-transform: lowercase;
}

.erp-key-price {
	margin-bottom: 8px;
}

.erp-key-price-per-unit {
	margin-bottom: 8px;
}

.erp-key-price-per-unit .woocommerce-Price-amount {
	font-size: 18px;
	font-weight: 600;
	color: #666;
	display: block;
}

.erp-key-price-label {
	font-size: 11px;
	color: #888;
	display: block;
	margin-top: 4px;
}

.erp-key-total-price {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #e0e0e0;
}

.erp-key-total-price strong {
	font-size: 22px;
	font-weight: 700;
	color: #2271b1;
	display: block;
}

.erp-key-total-label {
	font-size: 11px;
	color: #888;
	display: block;
	margin-top: 4px;
}

.erp-key-discount {
	margin-top: 8px;
}

.erp-key-discount-percent {
	margin-bottom: 10px;
	text-align: center;
}

.erp-key-discount-percent .discount-badge {
	font-size: 14px;
	padding: 6px 12px;
}

.erp-key-discount-percent .discount-badge.discount-zero {
	background: #e0e0e0;
	color: #666;
}

/* Detailed View */
.erp-pricing-detailed-view {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

.erp-pricing-table-content tr.discount-threshold {
	background: #f1f8f4;
}

.erp-pricing-table-content tr.discount-threshold td {
	font-weight: 600;
}

.erp-pricing-table-content {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}

.erp-pricing-table-content th,
.erp-pricing-table-content td {
	padding: 12px;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

.erp-pricing-table-content th {
	background: #f5f5f5;
	font-weight: 600;
}

.erp-pricing-table-content tr:hover {
	background: #f9f9f9;
}

.discount-badge {
	display: inline-block;
	padding: 4px 8px;
	background: #4caf50;
	color: #fff;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
}

/* Pricing info messages - new style */
.erp-pricing-info-messages {
	margin-top: 20px;
}

.erp-info-message {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.erp-info-message:last-child {
	margin-bottom: 0;
}

.erp-info-icon {
	width: 24px;
	height: 24px;
	min-width: 24px;
	min-height: 24px;
	flex-shrink: 0;
	display: block;
	object-fit: contain;
}

.erp-info-text {
	font-size: 16px;
	font-weight: 500;
	color: #333;
	line-height: 1.5;
}

.erp-info-link {
	text-decoration: underline !important;
	color: #333;
	transition: color 0.3s ease;
	cursor: pointer;
}

.erp-info-link:hover,
.erp-info-link:active,
.erp-info-link:focus {
	color: var(--wp--preset--color--primary, #2271b1) !important;
	text-decoration: underline !important;
}

/* Legacy styles - keep for backward compatibility */
.erp-cleaning-fee-note {
	margin-top: 15px;
	padding: 10px;
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	border-radius: 4px;
	font-size: 14px;
	color: #856404;
}

.erp-min-rental-time-info {
	margin-top: 15px;
	margin-bottom: 15px;
}

.erp-min-rental-notice {
	margin: 0;
	padding: 10px;
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	border-radius: 4px;
	font-size: 14px;
	color: #856404;
}

.erp-min-rental-notice strong {
	font-weight: 600;
}

.erp-min-rental-time-note {
	margin-top: 15px;
	padding: 10px;
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	border-radius: 4px;
	font-size: 14px;
	color: #856404;
}

/* jQuery UI Datepicker styling */
.ui-datepicker {
	font-family: inherit;
}

.ui-datepicker .ui-datepicker-header {
	background: var(--wp--preset--color--primary, #2271b1);
	color: #fff;
	border: none;
	border-radius: 4px 4px 0 0;
}

.ui-datepicker .ui-datepicker-title {
	color: #fff;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
	color: #fff;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover,
.ui-datepicker .ui-datepicker-prev:focus,
.ui-datepicker .ui-datepicker-next:focus,
.ui-datepicker .ui-datepicker-prev:active,
.ui-datepicker .ui-datepicker-next:active {
	background: transparent !important;
	color: #fff !important;
	border: none !important;
	cursor: pointer;
}

.ui-datepicker .ui-datepicker-prev .ui-icon,
.ui-datepicker .ui-datepicker-next .ui-icon {
	color: #fff !important;
}

.ui-datepicker .ui-datepicker-prev:hover .ui-icon,
.ui-datepicker .ui-datepicker-next:hover .ui-icon {
	color: #fff !important;
}

.ui-datepicker .ui-datepicker-calendar td a {
	color: var(--wp--preset--color--secondary, #2271b1);
}

.ui-datepicker .ui-datepicker-calendar td a.ui-state-active {
	background: var(--wp--preset--color--primary, #2271b1);
	color: #fff;
}

.ui-datepicker .ui-datepicker-calendar td a.ui-state-hover {
	background: #F2F2F2;
	color: var(--wp--preset--color--secondary, #2271b1);
}

.ui-datepicker .ui-datepicker-calendar td.ui-datepicker-today a {
	background: var(--wp--preset--color--secondary, #2271b1);
	color: #fff;
}


/* Monthly Pricing Table */
.erp-monthly-pricing {
	margin-bottom: 40px;
}

.erp-pricing-info {
	margin-bottom: 20px;
	padding: 10px;
	background: #f0f0f0;
	border-radius: 4px;
	font-size: 14px;
}

.erp-month-section {
	margin-bottom: 30px;
	overflow: hidden;
}

.erp-month-title {
	margin: 0;
	padding: 15px 20px;
	background: #ffffff;
	border: 2px solid #D4D4D4;
	border-radius: 16px 16px 0 0;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}

.erp-month-title .erp-toggle-icon {
	order: 999;
	margin-left: auto;
}

.erp-month-title.erp-collapsible:hover {
	opacity: 0.8;
}

.erp-toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: #F2F8F4;
	border-radius: 50%;
	font-weight: bold;
	font-size: 20px;
	flex-shrink: 0;
	color: var(--wp--preset--color--secondary, #2271b1);
	line-height: 1;
}

.erp-month-title.erp-collapsible[aria-expanded="true"] .erp-toggle-icon,
.erp-month-title.erp-collapsible.active .erp-toggle-icon {
	color: var(--wp--preset--color--secondary, #2271b1);
}

.erp-season-content {
	overflow: hidden;
	transition: max-height 0.3s ease-out;
	margin-top: 0;
}

.erp-season-content .erp-pricing-table-content {
	margin-top: 0;
	border: 2px solid #D4D4D4;
	border-top: none;
	border-radius: 0 0 16px 16px;
	overflow: hidden;
}

.erp-season-content .erp-pricing-table-content thead {
	display: table-header-group;
}

.erp-season-content .erp-pricing-table-content tbody tr {
	background: #F6F5F8;
	border-bottom: 2px solid #D4D4D4;
}

.erp-season-content .erp-pricing-table-content tbody tr:last-child {
	border-bottom: none;
	border-radius: 0 0 16px 16px;
	overflow: hidden;
}

.erp-season-content .erp-pricing-table-content tbody tr:last-child td:first-child {
	border-radius: 0 0 0 16px;
}

.erp-season-content .erp-pricing-table-content tbody tr:last-child td:last-child {
	border-radius: 0 0 16px 0;
}

.erp-season-content .erp-pricing-table-content th,
.erp-season-content .erp-pricing-table-content td {
	border-bottom: none;
	padding: 15px 20px;
}

.erp-season-content .erp-pricing-table-content tbody tr:hover {
	background: #F6F5F8;
}

.erp-month-title .erp-month-modifier {
	margin-left: 10px;
	margin-right: 0;
}

.erp-month-modifier {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	flex-shrink: 0;
	white-space: nowrap;
}

.erp-month-modifier.positive {
	background: #ff9800;
	color: #fff;
}

.erp-month-modifier.negative {
	background: #4caf50;
	color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
	.erp-form-row {
		flex-direction: column;
	}

	.erp-form-field {
		min-width: 100%;
	}

	.erp-month-section {
		padding: 15px;
	}

	.erp-month-title {
		font-size: 18px;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	
	.erp-month-modifier {
		flex-shrink: 0;
		white-space: nowrap;
	}

	.erp-pricing-table-content {
		font-size: 12px;
	}

	.erp-pricing-table-content th,
	.erp-pricing-table-content td {
		padding: 8px;
	}

	.erp-pricing-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.erp-pricing-header h3 {
		font-size: 18px;
	}

	.erp-pricing-key-points {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.erp-pricing-key-item {
		padding: 12px;
	}

	.erp-key-units strong {
		font-size: 20px;
	}

	.erp-key-price-per-unit .woocommerce-Price-amount {
		font-size: 16px;
	}

	.erp-key-total-price strong {
		font-size: 20px;
	}
}

