/**
 * Public Styles
 *
 * Frontend styles for Charter Booking System
 *
 * @package CharterBookingSystem
 */

/* ==================================
   Calendar Styles
   ================================== */

.cbs-calendar-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Calendar Header */
.cbs-calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding: 15px 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
}

.cbs-calendar-title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
}

.cbs-calendar-prev, .cbs-calendar-next {
	background: #0073aa;
	color: #fff;
	border: none;
	padding: 10px 15px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
}

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

.cbs-calendar-prev.cbs-disabled, .cbs-calendar-next.cbs-disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* View Toggle */
.cbs-view-toggle {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	justify-content: center;
}

.cbs-view-btn {
	padding: 10px 20px;
	background: #f0f0f1;
	border: 2px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s;
}

.cbs-view-btn.active {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
}

/* Grid View */
.cbs-calendar-grid {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
}

.cbs-calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
	margin-bottom: 10px;
}

.cbs-weekday {
	padding: 10px;
	text-align: center;
	font-weight: 600;
	color: #646970;
	background: #f9f9f9;
	border-radius: 4px;
}

.cbs-calendar-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 10px;
}

.cbs-calendar-day {
	min-height: 100px;
	padding: 10px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #fff;
	transition: all 0.2s;
}

.cbs-calendar-day.cbs-day-empty {
	background: #f9f9f9;
	border-color: transparent;
}

.cbs-calendar-day.cbs-has-events {
	background: #f0f8ff;
	border-color: #0073aa;
}

.cbs-calendar-day.cbs-today {
	background: #fffbcc;
	border-color: #ffb900;
	box-shadow: 0 0 0 2px #ffb900;
}

/* Past Dates - Disabled State */
.cbs-calendar-day.cbs-past-date {
	background: #f5f5f5;
	opacity: 0.5;
	pointer-events: none;
}

.cbs-calendar-day.cbs-past-date .cbs-day-number {
	color: #999;
}

.cbs-calendar-day.cbs-past-date .cbs-trip-card {
	cursor: not-allowed;
	opacity: 0.6;
}

.cbs-day-number {
	font-weight: 600;
	margin-bottom: 8px;
	color: #2c3338;
}

/* Trip Cards */
.cbs-trip-card {
	margin-top: 5px;
	padding: 5px 8px;
	background: #0073aa;
	color: #fff;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
}

.cbs-trip-card:hover {
	background: #005a87;
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cbs-trip-card.cbs-trip-sold-out {
	background: #dc3232;
	opacity: 0.7;
	cursor: not-allowed;
}

.cbs-trip-title {
	display: block;
	font-weight: 600;
	margin-bottom: 2px;
}

.cbs-trip-badge {
	display: inline-block;
	padding: 2px 5px;
	background: rgba(255,255,255,0.2);
	border-radius: 2px;
	font-size: 10px;
}

/* List View */
.cbs-calendar-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.cbs-list-item {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	transition: all 0.2s;
}

.cbs-list-item:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

.cbs-list-date {
	text-align: center;
	padding: 10px;
	background: #0073aa;
	color: #fff;
	border-radius: 6px;
	min-width: 60px;
}

.cbs-date-day {
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
}

.cbs-date-month {
	font-size: 12px;
	text-transform: uppercase;
	margin-top: 5px;
}

.cbs-list-details {
	flex: 1;
}

.cbs-list-details h3 {
	margin: 0 0 5px;
	font-size: 20px;
}

.cbs-destination {
	color: #646970;
	margin: 5px 0;
}

.cbs-list-meta {
	display: flex;
	gap: 15px;
	margin-top: 10px;
}

.cbs-meta-item {
	color: #646970;
	font-size: 14px;
}

/* Loading */
.cbs-loading {
	text-align: center;
	padding: 40px;
	color: #646970;
}

.cbs-spinner {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #0073aa;
	border-radius: 50%;
	animation: cbs-spin 1s linear infinite;
}

@keyframes cbs-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ==================================
   Modal Styles
   ================================== */

.cbs-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
}

.cbs-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.7);
}

.cbs-modal-content {
	position: relative;
	max-width: 800px;
	max-height: 90vh;
	margin: 5vh auto;
	background: #fff;
	border-radius: 8px;
	overflow-y: auto;
	padding: 30px;
}

.cbs-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #646970;
}

.cbs-modal-close:hover {
	color: #000;
}

/* ==================================
   Booking Form Styles
   ================================== */

.cbs-booking-form-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
}

/* Trip Summary */
.cbs-trip-summary {
	background: #f9f9f9;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 30px;
}

.cbs-trip-summary h3 {
	margin-top: 0;
	color: #2c3338;
}

.cbs-trip-details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin-top: 15px;
}

.cbs-trip-detail {
	padding: 10px;
	background: #fff;
	border-radius: 4px;
}

/* Form Styles */
.cbs-form {
	background: #fff;
	padding: 30px;
	border: 1px solid #ddd;
	border-radius: 8px;
}

.cbs-fieldset {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 25px;
}

.cbs-fieldset legend {
	font-size: 18px;
	font-weight: 600;
	padding: 0 10px;
	color: #2c3338;
}

.cbs-form-row {
	margin-bottom: 20px;
}

.cbs-form-row-2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.cbs-form-group {
	position: relative;
}

.cbs-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #2c3338;
}

.cbs-required {
	color: #dc3232;
}

.cbs-form-group input[type="text"],
.cbs-form-group input[type="email"],
.cbs-form-group input[type="tel"],
.cbs-form-group input[type="number"],
.cbs-form-group textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.3s;
}

.cbs-form-group input:focus,
.cbs-form-group textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.cbs-form-group input.cbs-field-error {
	border-color: #dc3232;
}

.cbs-error-message {
	display: none;
	color: #dc3232;
	font-size: 13px;
	margin-top: 5px;
}

.cbs-form-help {
	color: #646970;
	font-size: 13px;
	margin-top: 5px;
}

/* Booking Summary */
.cbs-booking-summary {
	background: #f9f9f9;
	padding: 20px;
	border-radius: 6px;
	margin-bottom: 20px;
}

.cbs-booking-summary h4 {
	margin-top: 0;
	color: #2c3338;
}

.cbs-summary-row {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid #ddd;
}

.cbs-summary-row:last-child {
	border-bottom: none;
}

.cbs-summary-total {
	font-size: 18px;
	padding-top: 15px;
	margin-top: 10px;
	border-top: 2px solid #2c3338;
}

/* Alerts */
.cbs-alert {
	padding: 15px 20px;
	border-radius: 6px;
	margin-bottom: 20px;
}

.cbs-alert-success {
	background: #d7f0d2;
	color: #2e7d32;
	border-left: 4px solid #46b450;
}

.cbs-alert-danger {
	background: #fecccf;
	color: #c62828;
	border-left: 4px solid #dc3232;
}

.cbs-alert-warning {
	background: #fff4cc;
	color: #b36200;
	border-left: 4px solid #ffb900;
}

/* Buttons */
.cbs-btn {
	display: inline-block;
	padding: 12px 24px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s;
	text-decoration: none;
}

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

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

.cbs-btn-large {
	padding: 15px 30px;
	font-size: 18px;
}

.cbs-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.cbs-form-actions {
	text-align: center;
	padding: 20px 0;
}

.cbs-form-note {
	margin-top: 15px;
	color: #646970;
	font-size: 14px;
}

/* Badges */
.cbs-badge {
	display: inline-block;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 4px;
	text-transform: uppercase;
}

.cbs-badge-success {
	background: #d7f0d2;
	color: #2e7d32;
}

.cbs-badge-warning {
	background: #fff4cc;
	color: #b36200;
}

.cbs-badge-danger {
	background: #fecccf;
	color: #c62828;
}

/* Availability Status */
.cbs-availability-status {
	margin-top: 10px;
	padding: 10px;
	border-radius: 4px;
}

.cbs-available {
	background: #d7f0d2;
	color: #2e7d32;
}

.cbs-limited {
	background: #fff4cc;
	color: #b36200;
}

.cbs-sold_out {
	background: #fecccf;
	color: #c62828;
}

/* ==================================
   Responsive Design
   ================================== */

@media (max-width: 768px) {
	.cbs-calendar-days {
		grid-template-columns: repeat(7, 1fr);
		gap: 5px;
	}

	.cbs-calendar-day {
		min-height: 80px;
		padding: 5px;
		font-size: 12px;
	}

	.cbs-form-row-2col {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.cbs-list-item {
		flex-direction: column;
		align-items: flex-start;
	}

	.cbs-trip-details {
		grid-template-columns: 1fr;
	}

	.cbs-modal-content {
		margin: 2vh 10px;
		padding: 20px;
	}
}

@media (max-width: 480px) {
	.cbs-calendar-header {
		flex-direction: column;
		gap: 15px;
	}

	.cbs-trip-card {
		font-size: 10px;
	}
}
