/**
 * Estilos para el Widget de Reservas (Optimizado y Minificado).
 * Diseño Premium, Limpio y Responsivo sin Tailwind CDN.
 */

:root {
	--gcb-primary: #0891b2;
	--gcb-primary-hover: #0e7490;
	--gcb-accent: #0f766e;
	--gcb-bg-gradient-start: #0e7490;
	--gcb-bg-gradient-end: #0f766e;
	--gcb-bg-light: #f8fafc;
	--gcb-border: #e2e8f0;
	--gcb-text: #1e293b;
	--gcb-text-muted: #64748b;
	--gcb-success: #059669;
	--gcb-success-light: #ecfdf5;
}

#gcb-booking-widget {
	display: grid;
	grid-template-columns: 1fr;
	max-width: 1000px;
	margin: 20px auto;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--gcb-text);
}

@media (min-width: 768px) {
	#gcb-booking-widget {
		grid-template-columns: 42% 58%;
	}
}

/* Panel Lateral - Sidebar */
.gcb-sidebar {
	background: linear-gradient(135deg, var(--gcb-bg-gradient-start) 0%, var(--gcb-bg-gradient-end) 100%);
	color: #ffffff;
	padding: 30px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.gcb-avatar {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	border: 4px solid rgba(255, 255, 255, 0.85);
	background-size: cover;
	background-position: center;
	background-color: rgba(255, 255, 255, 0.2);
}

.gcb-sidebar-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0;
	color: #ffffff !important;
}

.gcb-sidebar-desc {
	font-size: 0.9rem;
	opacity: 0.85;
	margin: 0;
	max-width: 250px;
	line-height: 1.4;
}

/* Selector de Servicio */
.gcb-select-wrapper {
	width: 100%;
	max-width: 280px;
	margin-top: 8px;
}

.gcb-select {
	width: 100%;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: #ffffff;
	color: var(--gcb-accent);
	font-size: 0.95rem;
	font-weight: 500;
	cursor: pointer;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	outline: none;
	transition: border-color 0.15s ease;
}

.gcb-select:focus {
	border-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* Calendario */
.gcb-calendar-wrapper {
	width: 100%;
	max-width: 320px;
	margin-top: 15px;
	background: #ffffff;
	border-radius: 12px;
	padding: 12px;
	box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

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

.gcb-calendar-title {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--gcb-text);
}

.gcb-nav-btn {
	background: #f1f5f9;
	border: none;
	color: var(--gcb-text-muted);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	transition: background 0.15s ease, color 0.15s ease;
}

.gcb-nav-btn:hover {
	background: var(--gcb-border);
	color: var(--gcb-text);
}

/* Rejilla del Calendario */
.gcb-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	text-align: center;
}

.gcb-cal-head {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--gcb-text-muted);
	padding: 4px 0;
	text-transform: uppercase;
}

.gcb-cal-day {
	font-size: 0.85rem;
	font-weight: 500;
	padding: 8px 0;
	border-radius: 6px;
	cursor: pointer;
	color: var(--gcb-text);
	transition: background 0.1s ease, color 0.1s ease;
	user-select: none;
}

.gcb-cal-day:hover:not(.gcb-disabled-day):not(.gcb-selected-day) {
	background: #f1f5f9;
}

.gcb-selected-day {
	background: var(--gcb-primary) !important;
	color: #ffffff !important;
	font-weight: 600;
}

.gcb-today {
	background: #ecfdf5;
	color: var(--gcb-success);
	font-weight: bold;
}

.gcb-disabled-day {
	color: #cbd5e1 !important;
	background: transparent !important;
	opacity: 0.4 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

.gcb-empty-cell {
	visibility: hidden;
}

.gcb-tz-display {
	font-size: 0.75rem;
	opacity: 0.8;
	margin-top: 5px;
}

/* Panel Principal Derecho */
.gcb-main-panel {
	padding: 24px;
	background: #ffffff;
	display: flex;
	flex-direction: column;
}

.gcb-selected-day-banner {
	background: var(--gcb-bg-light);
	border-radius: 8px;
	padding: 12px;
	font-weight: 600;
	text-align: center;
	border: 1px solid var(--gcb-border);
}

.gcb-section {
	margin-top: 20px;
}

.gcb-section-title {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--gcb-text-muted);
	margin: 0 0 10px 0;
	font-weight: 700;
}

.gcb-pill {
	display: inline-block;
	background: var(--gcb-bg-light);
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 500;
	border: 1px solid var(--gcb-border);
}

/* Grilla de Slots */
.gcb-slots-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.gcb-slot-btn {
	background: #ffffff;
	border: 1px solid var(--gcb-border);
	padding: 10px;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
	text-align: center;
	color: var(--gcb-text);
}

.gcb-slot-btn:hover:not(:disabled) {
	background: #ffffff;
	border-color: var(--gcb-primary);
	color: #000000 !important;
	transform: translateY(-1px);
}

.gcb-slot-btn:active:not(:disabled) {
	transform: translateY(0);
}

.gcb-empty-state {
	grid-column: span 2;
	text-align: center;
	padding: 24px;
	background: var(--gcb-bg-light);
	border-radius: 8px;
	color: var(--gcb-text-muted);
	font-size: 0.85rem;
}

/* Formulario */
.gcb-booking-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.gcb-form-title {
	font-size: 1.25rem;
	margin: 0;
	font-weight: 700;
}

.gcb-form-summary {
	font-size: 0.95rem;
	color: var(--gcb-success);
	font-weight: 600;
	margin: 0;
}

.gcb-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gcb-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--gcb-text);
}

.gcb-input {
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid var(--gcb-border);
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gcb-input:focus {
	border-color: var(--gcb-primary);
	box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.gcb-textarea {
	resize: vertical;
}

/* Botones */
.gcb-btn {
	padding: 10px 18px;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
	border: 1px solid transparent;
}

.gcb-btn-primary {
	background: var(--gcb-primary);
	color: #ffffff;
}

.gcb-btn-primary:hover:not(:disabled) {
	background: var(--gcb-primary-hover);
}

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

.gcb-btn-secondary {
	background: #ffffff;
	border-color: var(--gcb-border);
	color: var(--gcb-text);
}

.gcb-btn-secondary:hover {
	background: var(--gcb-bg-light);
}

.gcb-form-actions {
	display: flex;
	gap: 12px;
	margin-top: 10px;
}

.gcb-controls-footer {
	margin-top: 20px;
	display: flex;
	gap: 10px;
}

/* Alertas de Éxito */
.gcb-success-message {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	background: var(--gcb-success-light);
	border: 1px solid rgba(5, 150, 105, 0.2);
	color: var(--gcb-success);
	padding: 24px;
	border-radius: 12px;
	text-align: center;
	margin-top: 15px;
	animation: gcb-fade-in 0.25s ease-out;
}

.gcb-success-icon {
	font-size: 2.2rem;
}

.gcb-success-text {
	font-size: 0.95rem;
	line-height: 1.5;
	font-weight: 500;
}

/* Helpers */
.gcb-hidden {
	display: none !important;
}

.gcb-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@keyframes gcb-fade-in {
	from {
		opacity: 0;
		transform: scale(0.98);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Animaciones auxiliares para los slots al cargar */
.gcb-pulse {
	animation: gcb-pulse-anim 1.5s infinite ease-in-out;
}

@keyframes gcb-pulse-anim {
	0%, 100% { opacity: 0.6; }
	50% { opacity: 1; }
}
