/*
 * Il Caffè delle PMI: pulsante, scheda, finestra e pagine.
 * Usa i token del tema gpmi quando ci sono, con valori di riserva.
 */

/* Pulsante nella barra in alto, gemello di "Segui su Google". */
.topbar-caffe {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	font-weight: 500;
	color: inherit;
	white-space: nowrap;
	text-decoration: none;
}

.topbar-caffe:hover {
	color: var(--gp-accent, #ef4444);
}

.caffe-tazza {
	flex: none;
	vertical-align: -0.15em;
}

/* Scheda in fondo all'articolo. */
.caffe-scheda {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	padding: 18px 20px;
	margin-top: 16px;
	background: #fffaf3;
	border: 1px solid #ecdcc6;
	border-left: 3px solid #8b5a2b;
	border-radius: var(--gp-radius, 4px);
	box-shadow: var(--gp-shadow, none);
}

.caffe-scheda[hidden] {
	display: none;
}

.caffe-scheda-icona {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	color: #8b5a2b;
	background: #f6e8d6;
	border-radius: 50%;
}

.caffe-scheda-testo {
	flex: 1 1 260px;
	min-width: 0;
}

.caffe-scheda-testo p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--gp-ink-2, #3f4650);
}

.caffe-scheda-testo .caffe-scheda-titolo {
	margin-bottom: 3px;
	font-size: 15px;
	font-weight: 700;
	color: var(--gp-ink, #16181d);
}

.caffe-scheda-chiudi {
	display: grid;
	flex: none;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	color: var(--gp-muted, #6b7280);
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.caffe-scheda-chiudi:hover {
	color: var(--gp-ink, #16181d);
	background: var(--gp-line-soft, #eef0f3);
}

/* Bottoni. */
.caffe-bottone {
	display: inline-flex;
	flex: none;
	gap: 8px;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	background: var(--gp-ink, #16181d);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s ease;
}

.caffe-bottone:hover,
.caffe-bottone:focus-visible {
	color: #fff;
	background: #000;
}

.caffe-link-secondario {
	padding: 0;
	font: inherit;
	font-size: 14px;
	color: var(--gp-muted, #6b7280);
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

/* Finestra. */
.caffe-dialog {
	width: min(460px, calc(100% - 24px));
	max-height: calc(100% - 24px);
	padding: 0;
	color: var(--gp-ink, #16181d);
	background: #fff;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgb(16 24 40 / 30%);
}

.caffe-dialog::backdrop {
	background: rgb(22 24 29 / 55%);
}

.caffe-dialog-dentro {
	position: relative;
	padding: 28px 24px 22px;
}

.caffe-chiudi {
	position: absolute;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	color: var(--gp-muted, #6b7280);
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.caffe-chiudi:hover {
	color: var(--gp-ink, #16181d);
	background: var(--gp-line-soft, #eef0f3);
}

.caffe-occhiello {
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--gp-muted, #6b7280);
}

.caffe-titolo {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.2;
}

.caffe-titolo .caffe-tazza,
.caffe-pagina-titolo .caffe-tazza {
	color: #8b5a2b;
}

.caffe-lead {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--gp-ink-2, #3f4650);
}

/* Modulo. */
.caffe-riga {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.caffe-email {
	flex: 1 1 200px;
	min-width: 0;
	padding: 12px 14px;
	font: inherit;
	font-size: 16px;
	color: var(--gp-ink, #16181d);
	background: #fff;
	border: 1px solid #cfd3d9;
	border-radius: 8px;
}

.caffe-email:focus {
	border-color: var(--gp-link, #4169e1);
	outline: 2px solid var(--gp-link, #4169e1);
	outline-offset: 0;
}

.caffe-invia {
	flex: none;
	padding: 12px 20px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	background: #dc2626;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

.caffe-invia:hover {
	background: #b91c1c;
}

.caffe-invia:disabled {
	cursor: wait;
	opacity: .6;
}

.caffe-argomenti {
	margin-top: 12px;
	font-size: 14px;
}

.caffe-argomenti summary {
	font-weight: 600;
	color: var(--gp-ink-2, #3f4650);
	cursor: pointer;
}

.caffe-argomenti summary span {
	font-weight: 400;
	color: var(--gp-muted, #6b7280);
}

.caffe-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.caffe-chip {
	position: relative;
}

.caffe-chip input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.caffe-chip span {
	display: inline-block;
	padding: 6px 12px;
	font-size: 13px;
	line-height: 1.3;
	border: 1px solid #cfd3d9;
	border-radius: 999px;
	cursor: pointer;
	user-select: none;
}

.caffe-chip input:checked + span {
	color: #fff;
	background: var(--gp-ink, #16181d);
	border-color: var(--gp-ink, #16181d);
}

.caffe-chip input:focus-visible + span {
	outline: 2px solid var(--gp-link, #4169e1);
	outline-offset: 2px;
}

.caffe-nota,
.caffe-privacy {
	margin: 8px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--gp-muted, #6b7280);
}

.caffe-privacy a {
	color: inherit;
	text-decoration: underline;
}

.caffe-trappola {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.caffe-stato {
	margin: 8px 0 0;
	font-size: 14px;
}

.caffe-stato:empty {
	display: none;
}

.caffe-stato.is-errore {
	color: #b91c1c;
}

.caffe-fatto {
	margin: 0;
	padding: 14px 16px;
	font-size: 15px;
	line-height: 1.5;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
}

.caffe-fatto strong {
	display: block;
	margin-bottom: 2px;
}

/* Pagine. */
.caffe-pagina {
	padding-block: 32px 48px;
}

.caffe-pagina-card {
	max-width: 640px;
	padding: 32px 28px;
	margin: 0 auto;
	background: var(--gp-surface, #fff);
	border-top: 4px solid var(--gp-accent, #ef4444);
	border-radius: var(--gp-radius, 4px);
	box-shadow: var(--gp-shadow, none);
}

.caffe-pagina-titolo {
	margin: 0 0 12px;
	font-size: 30px;
	line-height: 1.15;
}

.caffe-punti {
	padding-left: 20px;
	margin: 0 0 20px;
	color: var(--gp-ink-2, #3f4650);
}

.caffe-avviso {
	padding: 12px 14px;
	margin: 0 0 16px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
}

.caffe-azioni {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin: 18px 0 0;
}

.caffe-separatore {
	margin: 28px 0 14px;
	border: 0;
	border-top: 1px solid var(--gp-line, #e4e6ea);
}

@media (width < 640px) {
	.topbar-caffe span {
		display: none;
	}

	.caffe-scheda .caffe-bottone {
		width: 100%;
	}

	.caffe-invia {
		width: 100%;
	}

	.caffe-pagina-card {
		padding: 24px 18px;
	}

	.caffe-pagina-titolo {
		font-size: 25px;
	}
}
