/* Customer Cloud Gallery admin styles */

.ccgal-quick-stats {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ccgal-quick-stats li {
	padding: 4px 0;
	border-bottom: 1px solid #f0f0f0;
}
.ccgal-quick-stats li:last-child { border-bottom: none; }

.ccgal-dashboard .ccgal-stat-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin: 16px 0 32px;
}

.ccgal-dashboard .ccgal-stat-card {
	display: flex;
	flex-direction: column;
	padding: 16px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.ccgal-dashboard .ccgal-stat-num {
	font-size: 2em;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.1;
}

.ccgal-dashboard .ccgal-stat-label {
	font-size: 0.9em;
	color: #666;
	margin-top: 4px;
}

.ccgal-dashboard .ccgal-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin: 24px 0;
}

@media (max-width: 960px) {
	.ccgal-dashboard .ccgal-columns {
		grid-template-columns: 1fr;
	}
}

/* ─────────────────────────────────────────────────────────────────────────
 * Collapsible stat sections (1.13.0) — four top-lists + visitor activity
 * each wrapped in a native <details> element with item count + per-section
 * limit dropdown in the <summary>.
 * ─────────────────────────────────────────────────────────────────────── */
.ccgal-dashboard .ccgal-stat-section {
	margin: 12px 0;
	border: 1px solid #c3c4c7;
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
}

.ccgal-dashboard .ccgal-stat-section[open] {
	border-color: #2271b1;
}

.ccgal-dashboard .ccgal-stat-summary {
	cursor: pointer;
	padding: 11px 16px;
	list-style: none;
	user-select: none;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	line-height: 1.4;
	background: #f6f7f7;
	transition: background 0.12s ease;
}

.ccgal-dashboard .ccgal-stat-summary:hover {
	background: #eef0f1;
}

.ccgal-dashboard .ccgal-stat-summary::-webkit-details-marker,
.ccgal-dashboard .ccgal-stat-summary::marker {
	display: none;
	content: '';
}

.ccgal-dashboard .ccgal-stat-summary::before {
	content: '▶';
	font-size: 9px;
	color: #50575e;
	transition: transform 0.15s ease;
	display: inline-block;
	width: 12px;
	flex-shrink: 0;
}

.ccgal-dashboard .ccgal-stat-section[open] > .ccgal-stat-summary::before {
	transform: rotate(90deg);
}

.ccgal-dashboard .ccgal-stat-section-title {
	font-weight: 600;
	color: #1d2327;
	font-size: 15px;
}

.ccgal-dashboard .ccgal-stat-section-count {
	color: #50575e;
	font-weight: normal;
}

.ccgal-dashboard .ccgal-stat-limit-wrapper {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ccgal-dashboard .ccgal-stat-limit {
	min-width: 70px;
	font-size: 13px;
}

.ccgal-dashboard .ccgal-stat-section-body {
	padding: 12px 16px 16px;
	border-top: 1px solid #e0e0e0;
}

.ccgal-dashboard .ccgal-stat-section-body > p:first-child {
	margin-top: 0;
}

@media (max-width: 782px) {
	.ccgal-dashboard .ccgal-stat-summary {
		flex-wrap: wrap;
	}
	.ccgal-dashboard .ccgal-stat-limit-wrapper {
		margin-left: 0;
		margin-top: 8px;
		width: 100%;
		justify-content: flex-end;
	}
}

/* ─────────────────────────────────────────────────────────────────────────
 * Inline toggles in the gallery list table (1.13.0, Pro only) — Stats-on
 * and Shop-on checkboxes with optimistic UI + fading feedback notice.
 * ─────────────────────────────────────────────────────────────────────── */
.column-ccgal_stats_toggle,
.column-ccgal_shop_toggle {
	width: 80px;
	text-align: center;
}

.ccgal-inline-toggle-wrapper {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

.ccgal-inline-toggle {
	margin: 0 !important;
	cursor: pointer;
}

.ccgal-inline-toggle:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.ccgal-inline-toggle-hint {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #c3c4c7;
	color: #fff;
	font-size: 10px;
	font-weight: bold;
	cursor: help;
	border: 0;
	padding: 0;
	line-height: 1;
}

.ccgal-inline-toggle-hint:focus {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.ccgal-inline-notice {
	display: inline-block;
	margin-left: 6px;
	font-size: 12px;
	font-weight: 600;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ccgal-inline-notice--ok {
	color: #00a32a;
}

.ccgal-inline-notice--err {
	color: #d63638;
}

.ccgal-fav-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 6px;
	margin-top: 8px;
	max-width: 700px;
}

.ccgal-fav-thumbs a {
	display: block;
	background: #f0f0f0;
	border-radius: 2px;
	overflow: hidden;
	aspect-ratio: 1/1;
	position: relative;
}

.ccgal-fav-thumbs img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #f6f6f6;
	display: block;
}

.ccgal-image-table .ccgal-thumb-link {
	display: inline-block;
	width: 90px;
	height: 90px;
	background: #f4f4f4;
	border-radius: 2px;
	overflow: hidden;
}

.ccgal-image-table .ccgal-thumb-link img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ccgal-image-table .ccgal-file-id {
	font-size: 11px;
	color: #888;
	word-break: break-all;
}

/* ── Welcome / Quick-Start Panel ─────────────────────────────────────── */
.ccgal-welcome-panel {
	background: #fff;
	border: 1px solid #e1ddd4;
	border-left: 4px solid #b8860b;
	border-radius: 6px;
	padding: 22px 26px 18px;
	margin: 16px 20px 24px 0;
	max-width: 1100px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ccgal-welcome-header h2 {
	margin: 0 0 4px;
	font-size: 1.35em;
	font-weight: 600;
	color: #1d2327;
}

.ccgal-welcome-lead {
	margin: 0 0 18px;
	color: #50575e;
	font-size: 14px;
}

.ccgal-welcome-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: ccgal-step;
}

.ccgal-welcome-step {
	display: flex;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid #f0ede5;
}
.ccgal-welcome-step:first-child { border-top: 0; padding-top: 4px; }

.ccgal-step-num {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f0ede5;
	color: #8b7d5e;
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
}
.ccgal-welcome-step.is-current .ccgal-step-num {
	background: #b8860b;
	color: #fff;
}
.ccgal-welcome-step.is-done .ccgal-step-num {
	background: #1a7e3a;
	color: #fff;
	font-size: 16px;
}

.ccgal-step-body {
	flex: 1 1 auto;
	min-width: 0;
}
.ccgal-step-body strong {
	display: block;
	font-size: 15px;
	color: #1d2327;
	margin-bottom: 4px;
}
.ccgal-step-body p {
	margin: 0 0 10px;
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
}

.ccgal-step-done-note {
	color: #1a7e3a !important;
	font-size: 13px;
	font-weight: 500;
}

.ccgal-welcome-guide {
	margin: 8px 0 0;
	background: #fafaf6;
	border: 1px solid #ece7d8;
	border-radius: 4px;
	padding: 0;
}
.ccgal-welcome-guide + .ccgal-welcome-guide { margin-top: 8px; }

.ccgal-welcome-guide > summary {
	padding: 9px 14px;
	cursor: pointer;
	font-weight: 500;
	font-size: 13px;
	color: #1d2327;
	user-select: none;
	list-style: none;
}
.ccgal-welcome-guide > summary::-webkit-details-marker { display: none; }
.ccgal-welcome-guide > summary::before {
	content: "▸";
	display: inline-block;
	margin-right: 8px;
	color: #b8860b;
	transition: transform 0.15s ease;
}
.ccgal-welcome-guide[open] > summary::before {
	transform: rotate(90deg);
}
.ccgal-welcome-guide > summary:hover {
	background: #f3efe2;
}

.ccgal-welcome-guide > ol {
	margin: 0 14px 12px 34px;
	padding: 0;
	font-size: 13px;
	color: #3c434a;
}
.ccgal-welcome-guide > ol li {
	margin: 8px 0;
	line-height: 1.55;
}
.ccgal-welcome-guide > ol ul {
	margin: 6px 0 6px 18px;
	font-size: 12.5px;
}

.ccgal-welcome-guide code {
	background: #fff;
	border: 1px solid #ddd6c0;
	padding: 1px 6px;
	border-radius: 3px;
	font-size: 12px;
}
.ccgal-welcome-guide code.ccgal-redirect-uri {
	display: block;
	margin: 6px 0 0;
	padding: 8px 10px;
	font-size: 12px;
	word-break: break-all;
	user-select: all;
	background: #fff;
}
