/* Item Rentals Frontend Styles */

* {
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: #333;
	line-height: 1.6;
}

/* Item Rentals Grid */
.item-rentals-search {
	margin-bottom: 30px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 4px;
}

.search-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	align-items: flex-end;
}

.field {
	display: flex;
	flex-direction: column;
}

.field label {
	margin-bottom: 5px;
	font-weight: 500;
	color: #333;
}

.field input,
.field select {
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.field button {
	padding: 10px 20px;
	background: #007cba;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
}

.field button:hover {
	background: #005a87;
}

.item-rentals-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.item-card {
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
}

.item-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: #f0f0f0;
}

.item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.item-content {
	padding: 15px;
}

.item-content h3 {
	margin: 0 0 10px 0;
	font-size: 18px;
	color: #333;
}

.item-location {
	margin: 5px 0;
	font-size: 13px;
	color: #666;
}

.item-excerpt {
	margin: 10px 0;
	font-size: 14px;
	color: #666;
	line-height: 1.4;
}

.item-pricing {
	margin: 10px 0;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.item-pricing span {
	font-weight: 500;
	color: #007cba;
	font-size: 14px;
}

.item-content .button {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 20px;
	background: #007cba;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.3s ease;
}

.item-content .button:hover {
	background: #005a87;
}

/* Item Detail Page */
.item-rental-detail {
	margin: 30px 0;
}

.item-detail-header {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	margin-bottom: 40px;
	padding: 20px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.item-detail-images {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.item-main-image {
	width: 100%;
	height: 400px;
	overflow: hidden;
	border-radius: 4px;
	background: #f0f0f0;
}

.item-main-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.item-gallery-thumbnails {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 10px;
}

.item-gallery-thumbnails img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.3s ease;
}

.item-gallery-thumbnails img:hover {
	border-color: #007cba;
}

.item-detail-info h1 {
	margin: 0 0 15px 0;
	font-size: 32px;
	color: #333;
}

.item-pricing-detail {
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
}

.item-pricing-detail h3 {
	margin: 0 0 15px 0;
	font-size: 16px;
}

.pricing-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.price-option {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px;
	background: white;
	border-radius: 4px;
}

.price-label {
	font-weight: 500;
	color: #333;
}

.price-value {
	font-size: 18px;
	font-weight: bold;
	color: #007cba;
}

.item-detail-description {
	margin: 30px 0;
	padding: 20px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.item-detail-description h2 {
	margin-top: 0;
	font-size: 24px;
	color: #333;
}

/* Booking Form */
.item-booking-section {
	margin: 30px 0;
	padding: 20px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.item-booking-section h2 {
	margin-top: 0;
	font-size: 24px;
	color: #333;
}

.item-booking-form {
	max-width: 600px;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 15px;
}

.form-row.full {
	grid-template-columns: 1fr;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	margin-bottom: 5px;
	font-weight: 500;
	color: #333;
}

.form-group label .required {
	color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-group small {
	margin-top: 5px;
	font-size: 12px;
	color: #666;
}

.price-display {
	padding: 15px;
	background: #d4edda;
	border: 1px solid #c3e6cb;
	border-radius: 4px;
	margin: 15px 0;
}

.price-display h3 {
	margin: 0;
	color: #155724;
}

.price-amount {
	font-size: 24px;
	font-weight: bold;
	color: #155724;
}

.availability-message {
	padding: 15px;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	margin: 15px 0;
}

.availability-message .error-message {
	margin: 0;
	color: #721c24;
	font-weight: 500;
}

.item-booking-form .button {
	padding: 12px 30px;
	background: #007cba;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 500;
	transition: background 0.3s ease;
	margin-top: 10px;
}

.item-booking-form .button:hover {
	background: #005a87;
}

.item-booking-form .button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Availability Calendar */
.item-availability-section {
	margin: 30px 0;
	padding: 20px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.item-availability-section h2 {
	margin-top: 0;
	font-size: 24px;
	color: #333;
}

.calendar-wrapper {
	margin: 20px 0;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 4px;
}

.calendar-navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	gap: 10px;
}

.calendar-prev, .calendar-next {
	padding: 8px 16px;
	background: #007cba;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.3s ease;
}

.calendar-prev:hover, .calendar-next:hover {
	background: #005a87;
}

.calendar-month-year {
	font-weight: bold;
	font-size: 16px;
	min-width: 150px;
	text-align: center;
}

.month-calendar {
	margin-bottom: 30px;
	background: white;
	padding: 15px;
	border-radius: 4px;
}

.month-calendar h3 {
	margin: 0 0 15px 0;
	font-size: 18px;
	color: #333;
}

.calendar-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
}

.calendar-table th {
	padding: 10px;
	background: #007cba;
	color: white;
	font-weight: bold;
	text-align: center;
	border: 1px solid #ddd;
}

.calendar-table td {
	padding: 10px;
	text-align: center;
	border: 1px solid #ddd;
	height: 50px;
	position: relative;
}

.calendar-table td.empty {
	background: #f5f5f5;
}

.calendar-day {
	cursor: pointer;
	transition: background-color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.calendar-day .day-number {
	display: block;
	font-weight: bold;
}

.calendar-day.status-available {
	background-color: #d4edda;
	color: #155724;
}

.calendar-day.status-available:hover {
	background-color: #c3e6cb;
}

.calendar-day.status-unavailable {
	background-color: #f8d7da;
	color: #721c24;
	cursor: not-allowed;
}

.calendar-day.status-unavailable:hover {
	background-color: #f5c6cb;
}

.calendar-day.status-booked {
	background-color: #d1ecf1;
	color: #0c5460;
	cursor: not-allowed;
}

.calendar-day.status-booked:hover {
	background-color: #bee5eb;
}

.calendar-legend {
	display: flex;
	justify-content: center;
	gap: 30px;
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
	flex-wrap: wrap;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.legend-color {
	display: inline-block;
	width: 20px;
	height: 20px;
	border-radius: 3px;
}

.legend-color.available {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
}

.legend-color.unavailable {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
}

.legend-color.booked {
	background-color: #d1ecf1;
	border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
	.item-detail-header {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.form-row {
		grid-template-columns: 1fr;
	}
	
	.item-rentals-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 15px;
	}
	
	.calendar-table td {
		padding: 5px;
		height: 40px;
		font-size: 12px;
	}
	
	.calendar-table th {
		padding: 5px;
		font-size: 12px;
	}
}

@media (max-width: 480px) {
	.item-gallery-thumbnails {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.item-detail-info h1 {
		font-size: 20px;
	}
	
	.calendar-legend {
		flex-direction: column;
		gap: 10px;
	}
	
	.calendar-table td {
		padding: 3px;
		height: 35px;
		font-size: 10px;
	}
	
	.calendar-table th {
		padding: 3px;
		font-size: 10px;
	}
	
	.search-fields {
		grid-template-columns: 1fr;
	}
	
	.item-rentals-grid {
		grid-template-columns: 1fr;
	}
}
