/**
 * EpicRent Booking Form Styles
 */

/* Przyciski – font-weight 500 */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
	font-weight: 500;
}

.erp-booking-form-wrapper {
	max-width: 600px;
	margin: 20px auto;
	padding: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.erp-booking-form-title {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 24px;
	color: #333;
}

.erp-booking-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.erp-form-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Data od / Data do obok siebie */
.erp-form-row-dates {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 20px;
}

.erp-form-row-dates .erp-form-row {
	flex: 1 1 180px;
	min-width: 0;
}

@media (max-width: 480px) {
	.erp-form-row-dates {
		flex-direction: column;
	}
	.erp-form-row-dates .erp-form-row {
		flex: 1 1 auto;
	}
}

/* Liczba gości – etykieta i input w jednej linii */
.erp-form-row-inline {
	flex-direction: row;
	align-items: center;
	gap: 12px;
}
.erp-form-row-inline label {
	margin: 0;
	white-space: nowrap;
}
.erp-form-row-inline input[type="number"] {
	width: 80px;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.erp-form-row label {
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.erp-form-row label .required {
	color: #e74c3c;
}

.erp-form-row input[type="text"],
.erp-form-row input[type="email"],
.erp-form-row input[type="tel"],
.erp-form-row input[type="date"] {
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.erp-form-row input[type="text"]:focus,
.erp-form-row input[type="email"]:focus,
.erp-form-row input[type="tel"]:focus,
.erp-form-row input[type="date"]:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Przycisk Sprawdź dostępność */
.erp-form-row-check {
	margin-top: 8px;
}

.erp-check-availability-button {
	padding: 12px 24px;
	background: #2d2d2d;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s, opacity 0.3s;
}

.erp-check-availability-button:hover:not(:disabled) {
	background: #1a1a1a;
}

.erp-check-availability-button:disabled {
	opacity: 0.7;
	cursor: wait;
}

/* Sekcja krok 2 (cena + dane) – widoczna od razu, nieaktywna do potwierdzenia dostępności */
.erp-booking-details {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid #e0e0e0;
}

.erp-booking-details-disabled {
	opacity: 0.75;
	pointer-events: none;
}

.erp-booking-details-disabled input,
.erp-booking-details-disabled button[type="submit"] {
	cursor: not-allowed;
}

.erp-booking-details-hint {
	margin: 0 0 16px 0;
	padding: 10px 12px;
	background: #f0f6fc;
	border-left: 4px solid #0073aa;
	font-size: 14px;
	color: #1d2327;
}

/* Status dostępności – komunikat wewnątrz */
#erp-availability-message.erp-available {
	color: #155724;
	background: #d4edda;
	border: 1px solid #c3e6cb;
	padding: 10px 14px;
	border-radius: 4px;
	display: inline-block;
}

#erp-availability-message.erp-unavailable {
	color: #721c24;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	padding: 10px 14px;
	border-radius: 4px;
	display: inline-block;
}

/* Price Calculation */
.erp-price-calculation {
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
}

.erp-price-calculation h4 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 18px;
	color: #333;
}

.erp-price-details {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

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

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

.erp-price-row.erp-price-total {
	padding-top: 15px;
	margin-top: 10px;
	border-top: 2px solid #333;
	border-bottom: none;
	font-size: 18px;
}

.erp-price-label {
	color: #666;
}

.erp-price-value {
	font-weight: 600;
	color: #333;
}

.erp-price-total .erp-price-label,
.erp-price-total .erp-price-value {
	font-size: 18px;
	color: #333;
}

/* Availability Status */
.erp-availability-status {
	margin-top: 15px;
	text-align: left;
	font-weight: 600;
}

/* Messages */
.erp-booking-messages {
	margin-top: 15px;
	padding: 12px;
	border-radius: 4px;
	display: none;
}

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

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

.erp-booking-messages p {
	margin: 0;
}

/* Komunikat pod przyciskiem „Wyślij zapytanie o rezerwację” */
.erp-submit-message {
	margin-top: 12px;
	padding: 12px;
	border-radius: 4px;
	font-size: 14px;
	display: none;
}

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

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

.erp-submit-message p {
	margin: 0;
}

/* Komunikaty / błędy formularza – zawsze widoczne pod formularzem */
.erp-booking-errors {
	margin-top: 24px;
	padding: 14px 16px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	font-size: 14px;
}

.erp-booking-errors-title {
	margin: 0 0 8px 0;
	font-weight: 600;
	color: #495057;
}

.erp-booking-errors-content {
	min-height: 1.5em;
	color: #212529;
}

.erp-booking-errors-content:empty::before {
	content: "—";
	color: #adb5bd;
}

.erp-booking-errors-content.erp-status-ok {
	color: #155724;
}

.erp-booking-errors-content.erp-status-error {
	color: #721c24;
	background: #f8d7da;
	padding: 6px 8px;
	border-radius: 4px;
	margin-top: 4px;
}

.erp-booking-errors-hint {
	margin: 10px 0 0 0;
	font-size: 12px;
	color: #6c757d;
}

/* Submit Button */
.erp-form-submit {
	margin-top: 20px;
}

.erp-submit-button {
	padding: 12px 24px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s, opacity 0.3s;
}

.erp-submit-button:hover:not(:disabled) {
	background: #005a87;
}

.erp-submit-button:disabled {
	background: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

/* Cennik – shortcode [erp_cennik id="6"] */
.erp-cennik-wrapper {
	max-width: 480px;
	margin: 20px 0;
	padding: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.erp-cennik-title {
	margin: 0 0 4px 0;
	font-size: 22px;
	color: #333;
}

.erp-cennik-subtitle {
	margin: 0 0 16px 0;
	font-size: 14px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.erp-cennik-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
}

.erp-cennik-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
	font-size: 15px;
}

.erp-cennik-table tr:last-child td {
	border-bottom: none;
}

.erp-cennik-label {
	color: #555;
	font-weight: 500;
}

.erp-cennik-value {
	text-align: right;
	font-weight: 600;
	color: #222;
}

.erp-cennik-discounts-title {
	margin: 12px 0 6px 0;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.erp-cennik-discounts {
	margin: 0 0 12px 0;
	padding-left: 20px;
	font-size: 14px;
	color: #444;
}

.erp-cennik-note {
	margin: 12px 0 0 0;
	font-size: 13px;
	color: #6c757d;
	font-style: italic;
}

.erp-cennik-error {
	color: #721c24;
	background: #f8d7da;
	padding: 12px;
	border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
	.erp-booking-form-wrapper {
		margin: 10px;
		padding: 15px;
	}

	.erp-booking-form-title {
		font-size: 20px;
	}

	.erp-cennik-wrapper {
		margin: 12px 0;
		padding: 16px;
	}
}
