/* DriveHub Frontend Styles */

:root {
	--drivehub-primary: #3b82f6;
	--drivehub-primary-dark: #2563eb;
	--drivehub-primary-light: rgba(59, 130, 246, 0.5);
	--drivehub-primary-lighter: rgba(59, 130, 246, 0.1);
}

.drivehub-module {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	color: #1e293b;
	position: relative;
	max-width: 960px;
	margin-left: auto;
	margin-right: auto;
}

/* ── Spinner keyframe ────────────────────────────────────────────────────── */

@keyframes drivehub-spin {
	to { transform: rotate(360deg); }
}

/* ── Shared helpers ──────────────────────────────────────────────────────── */

.drivehub-noscript,
.drivehub-msg {
	padding: 16px;
	color: #64748b;
	text-align: center;
}

.drivehub-error {
	padding: 12px 16px;
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
	border-radius: 6px;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.drivehub-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	padding: 8px 0 12px;
	font-size: 13px;
}

.drivehub-crumb {
	color: var(--drivehub-primary);
}

.drivehub-crumb:hover {
	text-decoration: underline;
}

.drivehub-sep {
	color: #94a3b8;
}

/* ── File Browser grid ───────────────────────────────────────────────────── */

.drivehub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	padding: 4px 0;
}

.drivehub-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	text-align: center;
	word-break: break-word;
	transition: box-shadow 0.15s;
}

.drivehub-card:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.drivehub-card.drivehub-folder {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.drivehub-icon {
	font-size: 28px;
	line-height: 1;
}

.drivehub-name {
	font-size: 12px;
	color: #334155;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: 100%;
}

.drivehub-size {
	font-size: 11px;
	color: #94a3b8;
}

.drivehub-dl {
	font-size: 11px;
	color: var(--drivehub-primary);
	text-decoration: none;
	margin-top: 2px;
}

.drivehub-dl:hover {
	text-decoration: underline;
}

/* ── Gallery ─────────────────────────────────────────────────────────────── */

.drivehub-gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--drivehub-cols, 3), 1fr);
	gap: 8px;
	padding: 12px 14px;
}

.drivehub-gallery-item {
	overflow: hidden;
	border-radius: 6px;
	aspect-ratio: 1;
	background: #f1f5f9;
	position: relative;
}

.drivehub-gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s;
}

.drivehub-gallery-item:hover .drivehub-gallery-img {
	transform: scale(1.04);
}

/* ── File List table ─────────────────────────────────────────────────────── */

.drivehub-list-table {
	width: 100%;
	border-collapse: collapse;
}

.drivehub-list-table th,
.drivehub-list-table td {
	padding: 8px 12px;
	text-align: left;
	border-bottom: 1px solid #e2e8f0;
	font-size: 13px;
}

.drivehub-list-table th {
	background: #f8fafc;
	font-weight: 600;
	color: #475569;
}

.drivehub-list-table tr:hover td {
	background: #f8fafc;
}

.drivehub-list-table a {
	color: var(--drivehub-primary);
	text-decoration: none;
	font-size: 16px;
}

.drivehub-list-table a:hover {
	text-decoration: underline;
}

/* ── Search box ──────────────────────────────────────────────────────────── */

.drivehub-search-form {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.drivehub-search-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	outline: none;
}

.drivehub-search-input:focus {
	border-color: var(--drivehub-primary);
	box-shadow: 0 0 0 3px var(--drivehub-primary-lighter);
}

.drivehub-search-btn {
	padding: 8px 16px;
	background: var(--drivehub-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
}

.drivehub-search-btn:hover {
	background: var(--drivehub-primary-dark);
}

.drivehub-search-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.drivehub-search-list li {
	padding: 8px 12px;
	border-bottom: 1px solid #f1f5f9;
	font-size: 13px;
}

/* ── Media player ────────────────────────────────────────────────────────── */

.drivehub-player {
	display: block;
	width: 100%;
	border-radius: 8px;
	background: #000;
}

/* ── Embed iframe ────────────────────────────────────────────────────────── */

.drivehub-embed-iframe {
	display: block;
	width: 100%;
	border: none;
	border-radius: 6px;
}

/* ── Slider / Carousel ───────────────────────────────────────────────────── */

.drivehub-slider-track {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.drivehub-slider-img {
	flex: 1;
	max-height: 420px;
	width: 100%;
	object-fit: contain;
	border-radius: 8px;
	background: #f1f5f9;
}

.drivehub-slider-prev,
.drivehub-slider-next {
	flex-shrink: 0;
	padding: 8px 14px;
	background: rgba(0,0,0,0.35);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 20px;
	cursor: pointer;
	transition: background 0.15s;
}

.drivehub-slider-prev:hover,
.drivehub-slider-next:hover {
	background: rgba(0,0,0,0.6);
}

/* ── Uploader / Dropzone ─────────────────────────────────────────────────── */

.drivehub-dropzone {
	position: relative;
	border: 2px dashed #cbd5e1;
	border-radius: 8px;
	padding: 40px 20px;
	text-align: center;
	color: #64748b;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.drivehub-dropzone:hover,
.drivehub-dropzone.drivehub-drag-over {
	border-color: var(--drivehub-primary);
	background: #eff6ff;
}

.drivehub-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.drivehub-upload-progress {
	margin-top: 12px;
}

.drivehub-progress-bar {
	padding: 6px 10px;
	background: #f1f5f9;
	border-radius: 4px;
	margin-bottom: 6px;
	font-size: 12px;
	color: #475569;
}

/* ── Review & Approve ────────────────────────────────────────────────────── */

.drivehub-review-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.drivehub-review-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}

.drivehub-review-item:hover {
	background: #eff6ff;
	border-color: #bfdbfe;
}

.drivehub-review-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 420px;
}

.drivehub-review-email {
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
}

.drivehub-review-submit {
	padding: 10px 20px;
	background: var(--drivehub-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
}

/* ── Browser wrap ────────────────────────────────────────────────────────── */

.drivehub-browser-wrap {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */

.drivehub-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
	gap: 10px;
	flex-wrap: wrap;
}

.drivehub-toolbar-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.drivehub-toolbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.drivehub-file-count {
	font-size: 12px;
	color: #64748b;
	white-space: nowrap;
}

/* ── Sort dropdown ───────────────────────────────────────────────────────── */

.drivehub-sort-wrap {
	position: relative;
}

.drivehub-sort-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	font-size: 12px;
	color: #334155;
	cursor: pointer;
	white-space: nowrap;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.drivehub-sort-btn:hover {
	border-color: var(--drivehub-primary);
	box-shadow: 0 0 0 3px var(--drivehub-primary-lighter);
}

.drivehub-sort-arrow {
	font-size: 10px;
	color: #94a3b8;
}

.drivehub-sort-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	min-width: 160px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
	z-index: 999;
	overflow: hidden;
	padding: 4px 0;
}

.drivehub-sort-menu--hidden {
	display: none;
}

.drivehub-sort-section {
	padding: 6px 12px 2px;
	font-size: 10px;
	font-weight: 700;
	color: #94a3b8;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.drivehub-sort-option {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 7px 12px 7px 28px;
	background: none;
	border: none;
	font-size: 13px;
	color: #334155;
	cursor: pointer;
	text-align: left;
	position: relative;
	transition: background 0.1s;
}

.drivehub-sort-option:hover {
	background: #f1f5f9;
}

.drivehub-sort-option--active::before {
	content: '✓';
	position: absolute;
	left: 10px;
	color: var(--drivehub-primary);
	font-size: 12px;
}

.drivehub-sort-option--active {
	color: var(--drivehub-primary);
	font-weight: 600;
}

/* ── View toggle ─────────────────────────────────────────────────────────── */

.drivehub-view-toggle {
	display: flex;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	overflow: hidden;
}

.drivehub-view-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5px 8px;
	background: #fff;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.drivehub-view-btn + .drivehub-view-btn {
	border-left: 1px solid #cbd5e1;
}

.drivehub-view-btn:hover {
	background: #f1f5f9;
	color: #334155;
}

.drivehub-view-btn--active {
	background: var(--drivehub-primary-lighter);
	color: var(--drivehub-primary);
}

/* ── Refresh button ──────────────────────────────────────────────────────── */

.drivehub-refresh-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #64748b;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.drivehub-refresh-btn:hover {
	border-color: var(--drivehub-primary);
	color: var(--drivehub-primary);
}

/* ── List view ───────────────────────────────────────────────────────────── */

.drivehub-grid--list {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0;
}

.drivehub-grid--list .drivehub-card {
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	text-align: left;
	padding: 9px 14px;
	border-radius: 0;
	border-top: none;
	border-left: none;
	border-right: none;
	border-bottom: 1px solid #e2e8f0;
	background: #fff;
	gap: 10px;
}

.drivehub-grid--list .drivehub-card:last-child {
	border-bottom: none;
}

.drivehub-grid--list .drivehub-card:hover {
	background: #f8fafc;
	box-shadow: none;
}

.drivehub-grid--list .drivehub-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.drivehub-grid--list .drivehub-name {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.drivehub-grid--list .drivehub-size {
	margin-left: auto;
	flex-shrink: 0;
	font-size: 11px;
	color: #94a3b8;
}

.drivehub-grid--list .drivehub-dl {
	flex-shrink: 0;
	margin-left: 8px;
}

/* Breadcrumb inside browser wrap gets padding */
.drivehub-browser-wrap .drivehub-breadcrumb {
	padding: 10px 14px 6px;
	border-bottom: 1px solid #f1f5f9;
	margin: 0;
}

.drivehub-browser-wrap .drivehub-grid {
	padding: 12px 14px;
}

.drivehub-browser-wrap .drivehub-grid--list {
	padding: 0;
}

/* ── Gallery name caption ────────────────────────────────────────────────── */

.drivehub-gallery-name {
	display: block;
	padding: 4px 6px;
	font-size: 11px;
	color: #475569;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: #f8fafc;
}

/* ── Gallery toolbar ─────────────────────────────────────────────────────── */

.drivehub-gallery-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
	gap: 10px;
	flex-wrap: wrap;
}

.drivehub-gallery-count {
	font-size: 13px;
	color: #64748b;
	font-weight: 500;
}

.drivehub-gallery-sort-wrap {
	position: relative;
}

.drivehub-gallery-sort-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
	cursor: pointer;
	white-space: nowrap;
}

.drivehub-gallery-sort-btn:hover {
	background: #f1f5f9;
}

.drivehub-gallery-sort-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	z-index: 9999;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(15,23,42,0.12);
	min-width: 160px;
	overflow: hidden;
	padding: 6px 0;
}

/* ── Gallery folders row (compact horizontal cards) ──────────────────────── */

.drivehub-gallery-folders-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 14px;
	border-bottom: 1px solid #f1f5f9;
}

.drivehub-gallery-folder-card {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px 7px 10px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fafafa;
	font-size: 13px;
	font-weight: 500;
	color: #334155;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s;
	white-space: nowrap;
	max-width: 200px;
	overflow: hidden;
}

.drivehub-gallery-folder-card span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.drivehub-gallery-folder-card:hover {
	border-color: var(--drivehub-primary);
	background: var(--drivehub-primary-lighter, #eff6ff);
	color: var(--drivehub-primary);
}

/* ── Gallery image hover overlay ─────────────────────────────────────────── */

.drivehub-gallery-img-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15,23,42,0.45);
	display: flex;
	align-items: flex-end;
	padding: 8px;
	opacity: 0;
	transition: opacity 0.18s;
	border-radius: inherit;
}

.drivehub-gallery-item:hover .drivehub-gallery-img-overlay {
	opacity: 1;
}

.drivehub-gallery-img-name {
	font-size: 11px;
	color: #fff;
	font-weight: 500;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: 100%;
	display: block;
}

/* ── Gallery breadcrumbs ─────────────────────────────────────────────────── */

.drivehub-gallery-breadcrumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 2px;
	padding: 8px 14px;
	font-size: 13px;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
}

.drivehub-gallery-crumb {
	color: var(--drivehub-primary);
	font-weight: 500;
	cursor: pointer;
}

.drivehub-gallery-crumb:hover {
	text-decoration: underline;
}

.drivehub-gallery-crumb--active {
	color: #1e293b;
	font-weight: 600;
	cursor: default;
}

.drivehub-gallery-crumb--active:hover {
	text-decoration: none;
}

.drivehub-gallery-crumb-sep {
	color: #94a3b8;
	margin: 0 2px;
}

/* ── Slider dots ─────────────────────────────────────────────────────────── */

.drivehub-slider-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	padding: 8px 0;
}

.drivehub-slider-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background: var(--drivehub-primary);
	cursor: pointer;
	padding: 0;
	transition: opacity 0.2s;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.drivehub-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	color: #94a3b8;
	text-align: center;
}

.drivehub-empty-state svg {
	margin-bottom: 12px;
	opacity: 0.5;
}

.drivehub-empty-state p {
	font-size: 13px;
	margin: 4px 0 0;
	color: #64748b;
}

.drivehub-review-submit:hover {
	background: var(--drivehub-primary-dark);
}

.drivehub-review-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.drivehub-review-msg {
	color: #dc2626;
	font-size: 13px;
	margin: 0;
}

.drivehub-review-success {
	padding: 16px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
	border-radius: 6px;
}

/* ── Module view page ────────────────────────────────────────────────────── */

body.drivehub-module-page {
	margin: 0;
	padding: 0;
	background: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.drivehub-module-page-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px;
}

.drivehub-module-page-header {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #64748b;
	margin-bottom: 20px;
}

.drivehub-module-page-home {
	color: var(--drivehub-primary);
	text-decoration: none;
	font-weight: 500;
}

.drivehub-module-page-home:hover {
	text-decoration: underline;
}

.drivehub-module-page-sep {
	color: #cbd5e1;
}

.drivehub-module-page-title {
	color: #1e293b;
	font-weight: 600;
}

.drivehub-module-page-content {
	/* background: #fff; */
	/* border-radius: 10px; */
	/* box-shadow: 0 1px 4px rgba(0,0,0,0.08); */
	/* overflow: hidden; */
}

/* ── Access Gates ────────────────────────────────────────────────────────── */

.drivehub-gate-box {
	padding: 32px 24px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	text-align: center;
	max-width: 480px;
	margin: 0 auto;
}

.drivehub-gate-box--denied {
	background: #fef2f2;
	border-color: #fecaca;
}

.drivehub-gate-message {
	margin-bottom: 20px;
	color: #334155;
}

.drivehub-gate-message h3 {
	margin: 0 0 8px;
	font-size: 18px;
	color: #1e293b;
}

.drivehub-gate-message p {
	margin: 0;
	font-size: 14px;
	color: #64748b;
}

.drivehub-gate-btn {
	display: inline-block;
	padding: 10px 24px;
	background: var(--drivehub-primary);
	color: #fff;
	border-radius: 6px;
	font-size: 14px;
	text-decoration: none;
}

.drivehub-gate-btn:hover {
	background: var(--drivehub-primary-dark);
	color: #fff;
}

.drivehub-password-form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.drivehub-password-input {
	width: 100%;
	max-width: 280px;
	padding: 9px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	outline: none;
}

.drivehub-password-input:focus {
	border-color: var(--drivehub-primary);
	box-shadow: 0 0 0 3px var(--drivehub-primary-lighter);
}

.drivehub-password-btn {
	padding: 9px 24px;
	background: var(--drivehub-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
}

.drivehub-password-btn:hover {
	background: var(--drivehub-primary-dark);
}

/* ── Preloader styles ────────────────────────────────────────────────────── */

.drivehub-preloader {
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 80px;
}

.drivehub-module.drivehub-loading .drivehub-preloader {
	display: flex;
}

/* Custom image preloader */
.drivehub-preloader-custom-img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	animation: drivehub-pulse 1.2s ease-in-out infinite;
}

/* Default spinner (ring with gap) */
.drivehub-spinner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 3px solid #e2e8f0;
	border-top-color: var(--drivehub-primary);
	border-radius: 50%;
	animation: drivehub-spin 0.7s linear infinite;
}

/* Ring */
.drivehub-spinner--ring {
	border-color: rgba(0,0,0,0.08);
	border-top-color: var(--drivehub-primary);
	border-width: 4px;
}

/* Spinner (circle arc) */
.drivehub-spinner--spinner {
	border-color: transparent;
	border-top-color: var(--drivehub-primary);
	border-right-color: var(--drivehub-primary);
}

/* Dot */
.drivehub-spinner--dot {
	width: auto;
	height: auto;
	border: none;
	animation: none;
	gap: 5px;
}
.drivehub-spinner--dot i {
	display: block;
	width: 9px;
	height: 9px;
	background: var(--drivehub-primary);
	border-radius: 50%;
	animation: drivehub-bounce 0.6s ease-in-out infinite alternate;
}
.drivehub-spinner--dot i:nth-child(2) { animation-delay: 0.15s; }
.drivehub-spinner--dot i:nth-child(3) { animation-delay: 0.3s; }

/* Atom */
.drivehub-spinner--atom {
	width: 40px;
	height: 40px;
	border: none;
	animation: none;
	position: relative;
}
.drivehub-spinner--atom i {
	position: absolute;
	inset: 0;
	border: 2px solid var(--drivehub-primary);
	border-radius: 50%;
	animation: drivehub-spin 2s linear infinite;
}
.drivehub-spinner--atom i:nth-child(2) { transform: rotate(60deg); }
.drivehub-spinner--atom i:nth-child(3) { transform: rotate(-60deg); }
.drivehub-spinner--atom b {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%,-50%);
	width: 8px; height: 8px;
	background: #f43f5e;
	border-radius: 50%;
}

/* Bar Chart */
.drivehub-spinner--bar-chart {
	width: auto;
	height: 28px;
	border: none;
	animation: none;
	align-items: flex-end;
	gap: 3px;
}
.drivehub-spinner--bar-chart i {
	display: block;
	width: 7px;
	background: var(--drivehub-primary);
	border-radius: 2px 2px 0 0;
	animation: drivehub-pulse 0.8s ease-in-out infinite;
}
.drivehub-spinner--bar-chart i:nth-child(1) { height: 40%; animation-delay: 0s; }
.drivehub-spinner--bar-chart i:nth-child(2) { height: 60%; animation-delay: 0.2s; }
.drivehub-spinner--bar-chart i:nth-child(3) { height: 80%; animation-delay: 0.4s; }
.drivehub-spinner--bar-chart i:nth-child(4) { height: 100%; animation-delay: 0.6s; }

/* Bars */
.drivehub-spinner--bars {
	width: auto;
	height: 28px;
	border: none;
	animation: none;
	align-items: center;
	gap: 3px;
}
.drivehub-spinner--bars i {
	display: block;
	width: 5px;
	height: 100%;
	background: var(--drivehub-primary);
	border-radius: 99px;
	animation: drivehub-pulse 0.7s ease-in-out infinite;
}
.drivehub-spinner--bars i:nth-child(2) { animation-delay: 0.15s; }
.drivehub-spinner--bars i:nth-child(3) { animation-delay: 0.3s; }
.drivehub-spinner--bars i:nth-child(4) { animation-delay: 0.45s; }

/* Bricks */
.drivehub-spinner--bricks {
	width: 28px;
	height: 28px;
	border: none;
	animation: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3px;
}
.drivehub-spinner--bricks i {
	display: block;
	background: var(--drivehub-primary);
	border-radius: 3px;
	animation: drivehub-pulse 0.8s ease-in-out infinite;
}
.drivehub-spinner--bricks i:nth-child(2) { animation-delay: 0.2s; }
.drivehub-spinner--bricks i:nth-child(3) { animation-delay: 0.4s; }
.drivehub-spinner--bricks i:nth-child(4) { animation-delay: 0.6s; }

/* Blocks */
.drivehub-spinner--blocks {
	width: 32px;
	height: 32px;
	border: none;
	animation: none;
	position: relative;
}
.drivehub-spinner--blocks i {
	position: absolute;
	width: 13px;
	height: 13px;
	border-radius: 3px;
	animation: drivehub-pulse 1s ease-in-out infinite;
}
.drivehub-spinner--blocks i:nth-child(1) { top: 0; left: 0; background: var(--drivehub-primary); }
.drivehub-spinner--blocks i:nth-child(2) { top: 0; right: 0; background: var(--drivehub-primary-light); animation-delay: 0.5s; }
.drivehub-spinner--blocks i:nth-child(3) { bottom: 0; right: 0; background: var(--drivehub-primary); animation-delay: 1s; }
.drivehub-spinner--blocks i:nth-child(4) { bottom: 0; left: 0; background: var(--drivehub-primary-light); animation-delay: 1.5s; }

/* Color Bar */
.drivehub-spinner--color-bar {
	width: 80px;
	height: 10px;
	border-radius: 99px;
	border: none;
	animation: none;
	background: #e2e8f0;
	overflow: hidden;
	position: relative;
}
.drivehub-spinner--color-bar::after {
	content: '';
	position: absolute;
	inset: 0;
	width: 50%;
	background: linear-gradient(90deg, var(--drivehub-primary), #a855f7, #f43f5e);
	animation: drivehub-pulse 1.2s ease-in-out infinite;
}

/* Clock */
.drivehub-spinner--clock {
	width: 32px;
	height: 32px;
	border: 3px solid #e2e8f0;
	border-radius: 50%;
	animation: none;
	position: relative;
}
.drivehub-spinner--clock i {
	position: absolute;
	bottom: 50%;
	left: 50%;
	width: 2px;
	height: 10px;
	background: var(--drivehub-primary);
	transform-origin: bottom center;
	transform: translateX(-50%);
	animation: drivehub-spin 1s linear infinite;
}

/* Dash Ring */
.drivehub-spinner--dash-ring {
	border: 3px dashed var(--drivehub-primary);
}

/* Ripple */
.drivehub-spinner--ripple {
	border: none;
	animation: none;
	position: relative;
}
.drivehub-spinner--ripple::before {
	content: '';
	position: absolute;
	inset: 0;
	border: 3px solid var(--drivehub-primary);
	border-radius: 50%;
	animation: drivehub-ping 1s cubic-bezier(0,0,0.2,1) infinite;
}
.drivehub-spinner--ripple b {
	display: block;
	width: 10px;
	height: 10px;
	background: var(--drivehub-primary);
	border-radius: 50%;
}

/* Progress */
.drivehub-spinner--progress {
	width: 100px;
	height: 8px;
	border-radius: 99px;
	border: none;
	animation: none;
	background: #e2e8f0;
	overflow: hidden;
}
.drivehub-spinner--progress i {
	display: block;
	height: 100%;
	width: 66%;
	background: var(--drivehub-primary);
	animation: drivehub-pulse 1.2s ease-in-out infinite;
}

/* Flip */
.drivehub-spinner--flip {
	background: var(--drivehub-primary);
	border: none;
	border-radius: 6px;
	animation: drivehub-spin 2s ease-in-out infinite;
}

/* Hourglass */
.drivehub-spinner--hourglass {
	font-size: 24px;
	width: auto;
	height: auto;
	border: none;
	animation: drivehub-bounce 1s ease-in-out infinite;
}

/* Infinity */
.drivehub-spinner--infinity {
	font-size: 28px;
	width: auto;
	height: auto;
	border: none;
	animation: drivehub-pulse 1.2s ease-in-out infinite;
	font-family: serif;
}

/* Dual Ring */
.drivehub-spinner--dual-ring {
	border-color: var(--drivehub-primary);
	border-top-color: transparent;
	border-bottom-color: transparent;
}

/* Fidget */
.drivehub-spinner--fidget {
	width: 40px;
	height: 40px;
	border: none;
	animation: drivehub-spin 1.2s linear infinite;
	position: relative;
}
.drivehub-spinner--fidget i {
	position: absolute;
	width: 11px;
	height: 11px;
	border-radius: 50%;
}
.drivehub-spinner--fidget i:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); background: var(--drivehub-primary); }
.drivehub-spinner--fidget i:nth-child(2) { bottom: 0; left: 50%; transform: translateX(-50%); background: #f43f5e; }
.drivehub-spinner--fidget i:nth-child(3) { left: 0; top: 50%; transform: translateY(-50%); background: #f59e0b; }
.drivehub-spinner--fidget i:nth-child(4) { right: 0; top: 50%; transform: translateY(-50%); background: #94a3b8; }
.drivehub-spinner--fidget b {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%,-50%);
	width: 9px; height: 9px;
	background: #fff;
	border: 2px solid #e2e8f0;
	border-radius: 50%;
}

/* Gear */
.drivehub-spinner--gear {
	width: 36px;
	height: 36px;
	border: none;
	animation: drivehub-spin 4s linear infinite;
	background: #94a3b8;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z'/%3E%3C/svg%3E") no-repeat center;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z'/%3E%3C/svg%3E") no-repeat center;
	mask-size: contain;
	-webkit-mask-size: contain;
}

/* Gears */
.drivehub-spinner--gears {
	width: 48px;
	height: 36px;
	border: none;
	animation: none;
	position: relative;
}
.drivehub-spinner--gears i {
	position: absolute;
	background: #94a3b8;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z'/%3E%3C/svg%3E") no-repeat center;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z'/%3E%3C/svg%3E") no-repeat center;
	mask-size: contain;
	-webkit-mask-size: contain;
}
.drivehub-spinner--gears i:nth-child(1) {
	width: 30px; height: 30px;
	top: 0; left: 0;
	animation: drivehub-spin 4s linear infinite;
}
.drivehub-spinner--gears i:nth-child(2) {
	width: 22px; height: 22px;
	bottom: 0; right: 0;
	background: #cbd5e1;
	animation: drivehub-spin 3s linear infinite reverse;
}

/* ── Preloader keyframes ──────────────────────────────────────────────────── */

@keyframes drivehub-ping {
	75%, 100% { transform: scale(2); opacity: 0; }
}

@keyframes drivehub-bounce {
	from { transform: translateY(0); }
	to   { transform: translateY(-6px); }
}

/* ── Elementor widget empty-state placeholder (editor-only) ──────────────── *
 * Mirrors the Gutenberg block's placeholder (gutenberg-block.css) for visual
 * parity: same card, same two-button "Insert Existing" / "Create New"
 * layout, same DriveHub brand-color theming via --drivehub-primary (set by
 * DriveHub_Hooks::drivehub_build_appearance_css(), already enqueued on this
 * frontend stylesheet -- no separate theme-color wiring needed here, unlike
 * the block editor). #3c82f6 fallback matches
 * DriveHub_SettingsController::drivehub_get_defaults()['themeColor']. */

.drivehub-widget-placeholder {
	--dh-block-primary: var(--drivehub-primary, #3c82f6);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 32px 24px;
	border: 2px dashed color-mix(in srgb, var(--dh-block-primary) 35%, transparent);
	border-radius: 6px;
	background-color: color-mix(in srgb, var(--dh-block-primary) 4%, transparent);
	text-align: center;
}

.drivehub-widget-placeholder-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	margin-bottom: 4px;
}

.drivehub-widget-placeholder-icon img {
	display: block;
	width: 32px;
	height: 32px;
}

.drivehub-widget-placeholder-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1e1e1e;
}

.drivehub-widget-placeholder-section {
	width: 100%;
	max-width: 360px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: 8px;
}

.drivehub-widget-placeholder-label {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #1e1e1e;
}

.drivehub-widget-placeholder-hint {
	margin: 0 0 6px;
	font-size: 12px;
	color: #757575;
}

.drivehub-widget-placeholder-divider {
	margin: 14px 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: #a7aaad;
}

.drivehub-widget-placeholder-insert,
.drivehub-widget-placeholder-add {
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	border-radius: 30px;
	padding: 6px 18px;
	cursor: pointer;
	line-height: 1.4;
}

.drivehub-widget-placeholder-insert {
	background: transparent;
	border: 1px solid var(--dh-block-primary);
	color: var(--dh-block-primary);
}

.drivehub-widget-placeholder-insert:hover {
	background-color: color-mix(in srgb, var(--dh-block-primary) 8%, transparent);
}

.drivehub-widget-placeholder-add {
	border: 1px solid var(--dh-block-primary);
	background-color: var(--dh-block-primary);
	color: #fff;
}

.drivehub-widget-placeholder-add:hover {
	background-color: color-mix(in srgb, var(--dh-block-primary) 85%, black);
}

/* Editor-only "selected" summary card (DriveHub_ElementorWidget::drivehub_render_selected_state())
   -- mirrors the Gutenberg block's selected state (drivehub-block-selected
   in gutenberg-block.css) for visual parity: icon, colored type badge,
   module name, "Change" action. Real frontend never renders this. */
.drivehub-widget-selected {
	--dh-block-primary: var(--drivehub-primary, #3c82f6);
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid #dadce0;
	border-radius: 6px;
	background: #fff;
}

.drivehub-widget-selected-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.drivehub-widget-selected-badge {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
}

.drivehub-widget-selected-name {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: #1e1e1e;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.drivehub-widget-selected-change {
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--dh-block-primary);
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	white-space: nowrap;
}

.drivehub-widget-selected-change:hover {
	text-decoration: underline;
}
