/* === FEED BACHECA === */

.cb-feed-wrap {
	max-width: 700px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tab selettore tipo */
.cb-type-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.cb-type-tab {
	flex: 1;
	min-width: 120px;
	padding: 10px 16px;
	border: 2px solid #e0e0e0;
	background: #fff;
	border-radius: 12px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #666;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.cb-type-tab:hover {
	border-color: var(--cb-tab-color, #ccc);
}

.cb-type-tab.active {
	border-color: var(--cb-tab-color, #007bff);
	background: var(--cb-tab-color, #007bff);
	color: #fff;
}

/* Barra filtri */
.cb-filter-bar {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
	flex-wrap: wrap;
	align-items: center;
}

.cb-gps-btn {
	padding: 8px 16px;
	background: #1D3A33;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: background 0.2s;
	white-space: nowrap;
}

.cb-gps-btn:hover {
	background: #2a5448;
}

.cb-radius-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #555;
}

.cb-radius-wrap input[type="range"] {
	width: 100px;
	accent-color: #1D3A33;
}

.cb-comune-wrap {
	position: relative;
	flex: 1;
	min-width: 180px;
}

/* Sort selector */
.cb-sort-wrap select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 13px;
	background: #fff;
	cursor: pointer;
	color: #333;
	white-space: nowrap;
}

.cb-sort-wrap select:focus {
	outline: none;
	border-color: #1D3A33;
}

#cb-comune-input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 13px;
	box-sizing: border-box;
}

#cb-comune-input:focus {
	outline: none;
	border-color: #1D3A33;
}

.cb-comune-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	z-index: 100;
	max-height: 200px;
	overflow-y: auto;
	display: none;
}

.cb-comune-item {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 13px;
	border-bottom: 1px solid #f0f0f0;
}

.cb-comune-item:hover {
	background: #f5f5f5;
}

.cb-comune-item:last-child {
	border-bottom: none;
}

/* Stato GPS */
.cb-gps-status {
	margin-bottom: 8px;
	font-size: 13px;
}

.cb-gps-searching { color: #666; }
.cb-gps-found { color: #28a745; }
.cb-gps-error { color: #dc3545; }

/* Card feed */
.cb-feed-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Container per tipo (server-rendered per SEO) */
.cb-feed-type-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cb-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-left: 4px solid #ccc;
	border-radius: 10px;
	padding: 14px 16px;
	transition: box-shadow 0.2s;
}

.cb-card:hover {
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.cb-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.cb-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 12px;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.cb-badge i {
	font-size: 10px;
}

.cb-time {
	font-size: 12px;
	color: #999;
}

.cb-card-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: #222;
}

.cb-card-content {
	margin: 0 0 10px;
	font-size: 14px;
	color: #555;
	line-height: 1.5;
}

.cb-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.cb-business-link {
	font-size: 13px;
	font-weight: 600;
	color: #1D3A33;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.cb-business-link:hover {
	text-decoration: underline;
}

.cb-comune {
	font-size: 12px;
	color: #888;
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

/* Loading / no results */
.cb-loading {
	text-align: center;
	padding: 30px;
	color: #999;
	font-size: 14px;
}

.cb-no-results {
	text-align: center;
	padding: 40px;
	color: #aaa;
}

.cb-no-results i {
	font-size: 32px;
	margin-bottom: 8px;
}

.cb-no-results p {
	margin: 4px 0 0;
	font-size: 14px;
}

/* Load more */
.cb-load-more-wrap {
	text-align: center;
	padding: 16px;
}

.cb-load-more {
	padding: 8px 24px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 20px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #555;
	transition: all 0.2s;
}

.cb-load-more:hover {
	background: #f5f5f5;
	border-color: #bbb;
}


/* === ICONA TEMATICA NELLE CARD === */

.cb-card-inner {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.cb-card-icon-wrap {
	flex: 0 0 64px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cb-card-icon {
	width: 64px;
	height: 64px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 28px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.cb-card-body {
	flex: 1;
	min-width: 0;
}

.cb-card-icon + .cb-card-body .cb-card-title {
	margin-top: 2px;
}

/* === SELETTORE ICONE NEL FORM === */

.cb-form-icon-row {
	margin: 8px 0 12px;
}

.cb-form-icons-label {
	font-size: 12px;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
}

.cb-form-icon-picker {
	display: flex;
	gap: 10px;
	align-items: center;
}

.cb-form-icon-select {
	flex: 1;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 13px;
	color: #333;
	background: #fff;
	min-width: 0;
}

.cb-form-icon-select:focus {
	outline: none;
	border-color: #999;
}

.cb-form-icon-preview {
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 18px;
	border: 2px solid rgba(255,255,255,0.4);
}

/* === ICONA NEL PANNELLO GESTIONE === */

.cb-manage-post-icon {
	font-size: 26px;
	margin-bottom: 8px;
	text-align: center;
}

/* === GESTIONE POST SCHEDA ATTIVITÀ === */

.cb-manage-wrap {
	margin: 30px 0;
	padding: 20px 0;
	border-top: 2px solid #e8e8e8;
}

.cb-manage-title {
	font-size: 20px;
	font-weight: 700;
	color: #1D3A33;
	margin-bottom: 16px;
}

.cb-manage-title i {
	margin-right: 6px;
}

.cb-manage-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.cb-manage-col {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	overflow: hidden;
}

.cb-manage-col-header {
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 700;
	border-bottom: 3px solid #ccc;
	display: flex;
	align-items: center;
	gap: 6px;
}

.cb-manage-col-header i {
	font-size: 16px;
}

/* Post attivo */
.cb-manage-post-active {
	padding: 14px;
}

.cb-manage-post-active h4 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: #222;
}

.cb-manage-post-active p {
	margin: 0 0 8px;
	font-size: 13px;
	color: #555;
	line-height: 1.5;
}

.cb-manage-post-meta {
	display: flex;
	gap: 10px;
	font-size: 11px;
	color: #999;
	margin-bottom: 10px;
}

.cb-manage-post-meta i {
	margin-right: 2px;
}

/* Post scaduto */
.cb-manage-post-expired {
	padding: 14px;
	opacity: 0.6;
}

.cb-expired-notice {
	color: #999;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 6px;
}

.cb-expired-title {
	margin: 0 0 4px;
	font-size: 14px;
	color: #888;
}

.cb-expired-content {
	margin: 0 0 8px;
	font-size: 13px;
	color: #aaa;
}

/* Form inserimento */
.cb-manage-form {
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cb-form-title,
.cb-form-content {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 13px;
	box-sizing: border-box;
	font-family: inherit;
}

.cb-form-title:focus,
.cb-form-content:focus {
	outline: none;
	border-color: #1D3A33;
}

.cb-form-content {
	resize: vertical;
	min-height: 60px;
}

.cb-form-row {
	display: flex;
	gap: 6px;
	align-items: center;
}

.cb-form-duration {
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 12px;
	flex: 1;
}

.cb-form-custom-date {
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 12px;
}

/* Bottoni gestione */
.cb-manage-actions {
	display: flex;
	gap: 6px;
}

.cb-btn {
	padding: 6px 12px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.cb-btn-publish {
	background: #1D3A33;
	color: #fff;
	width: 100%;
	justify-content: center;
	padding: 8px;
}

.cb-btn-publish:hover {
	background: #2a5448;
}

.cb-btn-edit {
	background: #e9ecef;
	color: #495057;
}

.cb-btn-edit:hover {
	background: #dee2e6;
}

.cb-btn-delete {
	background: #fee;
	color: #dc3545;
	padding: 6px 10px;
}

.cb-btn-delete:hover {
	background: #fcc;
}

.cb-btn-renew {
	background: #fff3cd;
	color: #856404;
}

.cb-btn-renew:hover {
	background: #ffeaa7;
}

/* Empty state */
.cb-manage-empty {
	padding: 20px 14px;
	text-align: center;
}

.cb-manage-empty p {
	color: #bbb;
	font-size: 13px;
	margin: 0;
}


/* === RESPONSIVE === */

@media (max-width: 768px) {
	.cb-manage-grid {
		grid-template-columns: 1fr;
	}

	.cb-type-tab {
		min-width: 100%;
	}

	.cb-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.cb-radius-wrap {
		justify-content: center;
	}

	.cb-card {
		padding: 12px;
	}

	.cb-card-icon-wrap {
		flex: 0 0 52px;
	}

	.cb-card-icon {
		width: 52px;
		height: 52px;
		font-size: 22px;
		border-radius: 12px;
	}

	.cb-card-title {
		font-size: 15px;
	}

	.cb-icon-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.cb-icon-option .cb-icon-preview {
		width: 34px;
		height: 34px;
		font-size: 14px;
	}
}
