/* 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);
}

/* Login gate: wp_login_form() markup, styled to match the password gate. */
.drivehub-login-required #drivehub-login-form {
	max-width: 320px;
	margin: 0 auto;
	text-align: left;
}

.drivehub-login-required #drivehub-login-form p {
	margin: 0 0 14px;
	padding: 0;
}

.drivehub-login-required #drivehub-login-form .login-username label,
.drivehub-login-required #drivehub-login-form .login-password label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
}

.drivehub-login-required #drivehub-login-form input[type="text"],
.drivehub-login-required #drivehub-login-form input[type="password"] {
	box-sizing: border-box;
	display: block;
	width: 100%;
	margin: 0;
	padding: 9px 12px;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.4;
	color: #1e293b;
	box-shadow: none;
	outline: none;
}

.drivehub-login-required #drivehub-login-form input[type="text"]:focus,
.drivehub-login-required #drivehub-login-form input[type="password"]:focus {
	border-color: var(--drivehub-primary);
	box-shadow: 0 0 0 3px var(--drivehub-primary-lighter);
}

/* wp_login_form() wraps the password field with a show/hide toggle on WP 6.x+. */
.drivehub-login-required #drivehub-login-form .wp-pwd {
	position: relative;
}

.drivehub-login-required #drivehub-login-form .login-remember label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #475569;
	cursor: pointer;
}

.drivehub-login-required #drivehub-login-form .login-remember input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--drivehub-primary);
}

.drivehub-login-required #drivehub-login-form .login-submit {
	margin-bottom: 0;
}

.drivehub-login-required #drivehub-login-form input[type="submit"] {
	box-sizing: border-box;
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 24px;
	background: var(--drivehub-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
}

.drivehub-login-required #drivehub-login-form input[type="submit"]:hover {
	background: var(--drivehub-primary-dark);
}

.drivehub-login-required #drivehub-login-form input[type="submit"]:focus-visible,
.drivehub-login-required #drivehub-login-form .login-remember input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--drivehub-primary);
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.drivehub-login-required .drivehub-gate-box {
		padding: 24px 16px;
	}
}

/* ── Preloader styles ────────────────────────────────────────────────────── */

.drivehub-preloader {
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 80px;
}

.drivehub-module.drivehub-loading .drivehub-preloader {
	display: flex;
}

/* 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);
}

/* ── 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). #007a56 fallback matches
 * DriveHub_SettingsController::drivehub_get_defaults()['themeColor']. */

.drivehub-widget-placeholder {
	--dh-block-primary: var(--drivehub-primary, #007a56);
	container-type: inline-size;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 16px;
	box-sizing: border-box;
	width: 100%;
	padding: 16px 18px;
	border: 1px dashed color-mix(in srgb, var(--dh-block-primary) 45%, #cbd5e1);
	border-radius: 10px;
	background: linear-gradient(135deg, color-mix(in srgb, var(--dh-block-primary) 5%, #fff), #fff 70%);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	text-align: left;
	line-height: 1.45;
}

.drivehub-widget-placeholder-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.drivehub-widget-placeholder-icon img {
	display: block;
	width: 24px;
	height: 24px;
	max-width: none;
}

/* Selected-state card uses the smaller tile. */
.drivehub-widget-placeholder-icon-sm {
	width: 36px;
	height: 36px;
	border-radius: 8px;
}

.drivehub-widget-placeholder-icon-sm img {
	width: 20px;
	height: 20px;
}

.drivehub-widget-placeholder-body {
	flex: 1 1 220px;
	min-width: 0;
}

.drivehub-widget-placeholder-title {
	margin: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
}

.drivehub-widget-placeholder-hint {
	margin: 2px 0 0;
	padding: 0;
	font-size: 12.5px;
	color: #475569;
}

.drivehub-widget-placeholder-actions {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	gap: 8px;
}

/* Theme button styles reach into the preview, so every property a theme
   commonly sets on <button> is pinned here. */
.drivehub-widget-placeholder-insert,
.drivehub-widget-placeholder-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	margin: 0;
	padding: 0 14px;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.drivehub-widget-placeholder-insert {
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #0f172a;
}

.drivehub-widget-placeholder-insert:hover {
	border-color: var(--dh-block-primary);
	background: #fff;
	color: var(--dh-block-primary);
}

.drivehub-widget-placeholder-add {
	border: 1px solid var(--dh-block-primary);
	background: var(--dh-block-primary);
	color: #fff;
}

.drivehub-widget-placeholder-add:hover {
	border-color: color-mix(in srgb, var(--dh-block-primary) 85%, #000);
	background: color-mix(in srgb, var(--dh-block-primary) 85%, #000);
	color: #fff;
}

.drivehub-widget-placeholder-insert:focus-visible,
.drivehub-widget-placeholder-add:focus-visible,
.drivehub-widget-selected-change:focus-visible {
	outline: 2px solid var(--dh-block-primary);
	outline-offset: 2px;
}

.drivehub-widget-placeholder-add svg {
	flex: none;
}

/* Narrow columns: actions take the full width, side by side. */
@container (max-width: 420px) {
	.drivehub-widget-placeholder-actions {
		width: 100%;
	}

	.drivehub-widget-placeholder-insert,
	.drivehub-widget-placeholder-add {
		flex: 1 1 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.drivehub-widget-placeholder-insert,
	.drivehub-widget-placeholder-add {
		transition: none;
	}
}

/* Form field with no module chosen: every form integration prints
   <div class="drivehub-msg">Google Drive: no module configured.</div>. Shown
   as a quiet bordered setup hint instead of bare centred text. (The <p>
   variant of .drivehub-msg is the module's loading text and is untouched.) */
div.drivehub-msg {
	padding: 12px 14px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	background: #f8fafc;
	color: #475569;
	font-size: 13px;
	line-height: 1.45;
	text-align: left;
}

/* 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, #007a56);
	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;
}
