/**
 * Vibe Hours Bar - Frontend Premium Styles
 */

/* Core container styling */
.vhb-bar-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
	line-height: 1.4;
	transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: none; /* Let clicks pass through container except for inner interactive elements */
}

.vhb-bar-container * {
	box-sizing: border-box;
}

/* Positionings */
.vhb-position-bottom_center {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 999999;
}

.vhb-position-bottom_left {
	position: fixed;
	bottom: 24px;
	left: 24px;
	z-index: 999999;
}

.vhb-position-bottom_right {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
}

.vhb-position-bottom_full {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 999999;
}

/* Shadow Styling */
.vhb-has-shadow .vhb-trigger,
.vhb-has-shadow .vhb-bar {
	box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3), 0 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* Trigger Button (Minimiert) */
.vhb-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--vhb-bg-color);
	color: var(--vhb-text-color);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--vhb-border-radius);
	padding: 12px 24px;
	cursor: pointer;
	pointer-events: auto;
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	outline: none;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.vhb-trigger:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.4), 0 0 1px 1px rgba(255, 255, 255, 0.1);
}

.vhb-trigger:focus-visible {
	outline: 2px solid var(--vhb-highlight-color);
	outline-offset: 2px;
}

.vhb-trigger-content {
	display: flex;
	align-items: center;
	gap: 8px;
}

.vhb-trigger-icon {
	display: inline-flex;
	color: var(--vhb-icon-color);
	align-items: center;
}

/* Expanded Bar Styling */
.vhb-bar {
	display: flex;
	align-items: center;
	background-color: var(--vhb-bg-color);
	color: var(--vhb-text-color);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--vhb-border-radius);
	padding: 8px 16px;
	pointer-events: auto;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	max-width: 90vw;
	transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modify borders for full width mode */
.vhb-position-bottom_full .vhb-bar,
.vhb-position-bottom_full .vhb-trigger {
	border-radius: 0 !important;
	border-left: none;
	border-right: none;
	border-bottom: none;
	max-width: 100%;
	width: 100%;
}

.vhb-bar-inner {
	display: flex;
	align-items: center;
	width: 100%;
	gap: 15px;
}

/* Slots List Layout */
.vhb-slots-list {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	gap: 8px;
	flex-grow: 1;
	padding: 4px 0;
}

/* Hide scrollbar for layout while keeping functionality */
.vhb-slots-list::-webkit-scrollbar {
	display: none;
}
.vhb-slots-list {
	-ms-overflow-style: none;  /* IE and Edge */
	scrollbar-width: none;  /* Firefox */
}

/* Individual Slot Pill */
.vhb-slot-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.05);
	padding: 6px 14px;
	border-radius: 9999px;
	font-size: 13px;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.vhb-slot-pill:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.15);
}

/* Today highlight styling */
.vhb-slot-pill.vhb-today {
	font-weight: 700;
	border: 1.5px solid var(--vhb-highlight-color);
	background: rgba(255, 255, 255, 0.08);
	padding-top: 5px;
	padding-bottom: 5px;
	position: relative;
	box-shadow: 0 0 12px -2px rgba(255, 221, 87, 0.2);
}

.vhb-today-badge {
	background-color: var(--vhb-highlight-color);
	color: #000;
	font-size: 9px;
	text-transform: uppercase;
	padding: 1px 5px;
	border-radius: 3px;
	font-weight: 800;
	margin-right: 4px;
	vertical-align: middle;
	letter-spacing: 0.5px;
}

/* Status colors and styling modifications */
.vhb-status-closed,
.vhb-status-holiday {
	opacity: 0.85;
}

.vhb-status-closed .vhb-time-label,
.vhb-status-holiday .vhb-time-label {
	color: #ff6b6b;
	font-weight: 600;
}

.vhb-status-note .vhb-time-label {
	color: var(--vhb-highlight-color);
}

/* Day/Time Label split details */
.vhb-day-label {
	opacity: 0.9;
}

.vhb-day-name {
	font-weight: 600;
}

.vhb-day-date {
	opacity: 0.65;
	font-size: 11px;
	margin-left: 2px;
}

.vhb-time-label {
	opacity: 1;
	letter-spacing: -0.2px;
}

/* Calendar Export Button */
.vhb-export-cal {
	border: none;
	background: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: var(--vhb-icon-color);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0.4;
	transition: opacity 0.2s ease, transform 0.2s ease;
	vertical-align: middle;
}

.vhb-export-cal:hover {
	opacity: 1;
	transform: scale(1.1);
}

.vhb-export-cal svg {
	width: 13px;
	height: 13px;
}

/* Close Button styling */
.vhb-close-btn {
	background: none;
	border: none;
	color: var(--vhb-text-color);
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.5;
	transition: opacity 0.2s ease, transform 0.2s ease;
	border-radius: 50%;
}

.vhb-close-btn:hover {
	opacity: 1;
	background-color: rgba(255, 255, 255, 0.08);
	transform: rotate(90deg);
}

.vhb-close-btn:focus-visible {
	outline: 2px solid var(--vhb-highlight-color);
}

/* Device Visibility break points */
@media (min-width: 1025px) {
	.vhb-hide-desktop {
		display: none !important;
	}
}

@media (min-width: 601px) and (max-width: 1024px) {
	.vhb-hide-tablet {
		display: none !important;
	}
}

@media (max-width: 600px) {
	.vhb-hide-mobile {
		display: none !important;
	}

	.vhb-bar {
		padding: 6px 12px;
		width: 92vw;
	}

	.vhb-bar-inner {
		gap: 8px;
	}

	.vhb-slots-list {
		gap: 6px;
	}

	.vhb-slot-pill {
		padding: 5px 10px;
		font-size: 12px;
	}

	.vhb-day-date {
		display: none; /* Hide date numbers on mobile to fit text better */
	}

	.vhb-position-bottom_center {
		bottom: 12px;
	}
	.vhb-position-bottom_left {
		bottom: 12px;
		left: 12px;
	}
	.vhb-position-bottom_right {
		bottom: 12px;
		right: 12px;
	}
}

/* Inline/Shortcode behavior overrides */
.vhb-bar-container.vhb-inline {
	position: static !important;
	transform: none !important;
	display: block !important;
	margin: 15px 0;
	pointer-events: auto;
	max-width: 100%;
}

.vhb-inline .vhb-bar {
	max-width: 100%;
	width: 100%;
}

.vhb-inline .vhb-close-btn {
	display: none; /* Close button makes no sense in inline shortcodes */
}
