// Questo file fa parte di MyTown.
// MyTown è software libero: puoi ridistribuirlo e/o modificarlo secondo
// i termini della GNU Affero General Public License come pubblicata dalla
// Free Software Foundation, versione 3.
// Distribuito senza ALCUNA GARANZIA; vedi la GNU AGPL v3 per i dettagli.
// Copyright (C) Kondor Consulting & Services S.r.l.
// SPDX-License-Identifier: AGPL-3.0-or-later

// ============================================================
// DESIGN TOKENS
// ============================================================

:host {
	--hero-h: 240px;
	--card-radius: 20px;
	--item-radius: 14px;
	--spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

// ============================================================
// HERO
// ============================================================

.hero-section {
	position: relative;
	width: 100%;
	height: var(--hero-h);
	overflow: hidden;

	.hero-image-bg {
		position: absolute;
		inset: 0;
		background-size: cover;
		background-position: center;
		transform: scale(1.04);
	}

	.hero-dark-overlay {
		position: absolute;
		inset: 0;
		background: linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.04) 0%,
			rgba(0, 0, 0, 0.12) 40%,
			rgba(0, 0, 0, 0.52) 100%
		);
		pointer-events: none;
	}

	.hero-favorite-btn {
		position: absolute;
		top: 10px;
		right: 10px;
		z-index: 10;
		--background: rgba(255, 255, 255, 0.2);
		--background-hover: rgba(255, 255, 255, 0.35);
		--border-radius: 50%;
		--padding-start: 8px;
		--padding-end: 8px;
		--box-shadow: none;
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
		border: 1px solid rgba(255, 255, 255, 0.28);

		ion-icon {
			font-size: 22px;
			color: #fff;
			filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));

			&.is-favorite {
				color: #ff3b30;
			}
		}
	}
}

// ============================================================
// HOME CONTAINER
// ============================================================

.home-container {
	padding: 0;
	background: var(--ion-background-color, #f8f8f8);

	&.has-hero {
		margin-top: -24px;
		position: relative;
		border-radius: 24px 24px 0 0;
		background: var(--ion-background-color, #f8f8f8);
		box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.14);
	}
}

// ============================================================
// COMPANY HEADER
// ============================================================

.company-header {
	padding: 22px 20px 16px;
}

.company-name {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.6px;
	color: var(--ion-color-dark, #1c1c1e);
	margin: 0 0 5px;
	line-height: 1.1;
}

// Badge valutazione media sotto il nome (tap -> tab recensioni)
.rating-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 6px;
	cursor: pointer;

	ion-icon {
		color: #f59e0b;
		font-size: 16px;
	}

	.rating-value {
		font-size: 14px;
		font-weight: 700;
		color: var(--ion-color-dark, #1c1c1e);
	}

	.rating-count {
		font-size: 13px;
		color: var(--ion-color-medium, #64748b);
	}
}

.company-desc {
	font-size: 13px;
	line-height: 1.55;
	color: var(--ion-color-medium);
	margin: 0 0 14px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.info-chips-row {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.info-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--ion-color-light, #f4f5f8);
	border-radius: 20px;
	padding: 5px 10px 5px 7px;
	font-size: 12px;
	font-weight: 500;
	color: var(--ion-color-dark-shade);
	cursor: pointer;

	ion-icon {
		font-size: 13px;
		color: var(--ion-color-primary);
		flex-shrink: 0;
	}

	span {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 170px;
	}
}

// ============================================================
// ACTION BUTTONS — squircle icon + label
// ============================================================

.action-row {
	display: flex;
	gap: 6px;
	padding: 0 16px 20px;
	overflow-x: auto;
	scrollbar-width: none;

	&::-webkit-scrollbar {
		display: none;
	}
}

.action-pill {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	flex-shrink: 0;
	min-width: 60px;

	span {
		font-size: 11px;
		font-weight: 500;
		color: var(--ion-color-dark-shade);
		white-space: nowrap;
		letter-spacing: 0.1px;
	}
}

.action-pill-icon {
	width: 54px;
	height: 54px;
	border-radius: 16px;
	background: rgba(var(--ion-color-primary-rgb), 0.07);
	border: 1.5px solid rgba(var(--ion-color-primary-rgb), 0.14);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.14s var(--spring), background 0.14s ease;

	ion-icon {
		font-size: 22px;
		color: var(--ion-color-primary);
	}

	&:active {
		transform: scale(0.9);
		background: rgba(var(--ion-color-primary-rgb), 0.16);
	}
}

// ============================================================
// SEGMENT NAV
// ============================================================

.segment-wrap {
	padding: 0 16px 0;
	border-bottom: 1.5px solid var(--ion-color-light-shade, #e5e6ea);
}

.home-segment {
	--background: transparent;

	ion-segment-button {
		--color: var(--ion-color-medium);
		--color-checked: var(--ion-color-primary);
		--indicator-color: var(--ion-color-primary);
		--indicator-height: 2.5px;
		--border-radius: 0;
		font-size: 10px;
		font-weight: 700;
		letter-spacing: 0.2px;
		min-height: 40px;
		text-transform: uppercase;
	}
}

// ============================================================
// SECTION HEADER
// ============================================================

.tab-content {
	min-height: 200px;
}

.services-section {
	padding: 0;
}

.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 16px 12px;
}

.section-title {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.4px;
	color: var(--ion-color-dark, #1c1c1e);
	margin: 0;
}

.section-count-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 22px;
	border-radius: 11px;
	background: var(--ion-color-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 0 8px;
	letter-spacing: 0.2px;
}

.section-link-btn {
	--color: var(--ion-color-primary);
	font-size: 13px;
	font-weight: 600;
	margin: 0;
}

// ============================================================
// LOADING + EMPTY STATE
// ============================================================

.loading-wrap {
	display: flex;
	justify-content: center;
	padding: 40px 16px;
}

.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 48px 16px 32px;

	.empty-icon-wrap {
		width: 68px;
		height: 68px;
		border-radius: 22px;
		background: var(--ion-color-light, #f4f5f8);
		display: flex;
		align-items: center;
		justify-content: center;
		margin-bottom: 16px;

		ion-icon {
			font-size: 32px;
			color: var(--ion-color-medium);
		}
	}

	p {
		font-size: 14px;
		color: var(--ion-color-medium);
		margin: 0;
		text-align: center;
		font-weight: 500;
	}
}

// ============================================================
// ============================================================
// SELECTION HEADER (when a service is chosen)
// ============================================================

.selection-header {
	display: flex;
	align-items: center;
	margin: 14px 16px 10px;
	background: var(--ion-card-background, #fff);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	animation: fadeUp 0.25s var(--ease-out) both;
}

.sel-accent {
	width: 4px;
	align-self: stretch;
	flex-shrink: 0;
}

.sel-info {
	flex: 1;
	padding: 12px 10px 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sel-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--ion-color-primary);
}

.sel-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--ion-color-dark);
	letter-spacing: -0.2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sel-meta {
	font-size: 12px;
	color: var(--ion-color-medium);
	font-weight: 500;
}

.sel-extra {
	color: var(--ion-color-success);
	font-weight: 600;
}

.sel-clear-btn {
	background: none;
	border: none;
	padding: 0 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	flex-shrink: 0;

	ion-icon {
		font-size: 22px;
		color: var(--ion-color-medium);
	}
}

// ============================================================
// CATEGORY ACCORDION
// ============================================================

.category-list {
	padding: 0 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.category-group {
	border-radius: var(--item-radius);
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04);
	background: var(--ion-card-background, #fff);
	transition: box-shadow 0.2s ease;

	&.has-selection {
		box-shadow: 0 2px 8px rgba(var(--ion-color-primary-rgb), 0.12),
			0 4px 16px rgba(var(--ion-color-primary-rgb), 0.08);
	}
}

.category-header {
	display: flex;
	align-items: center;
	cursor: pointer;
	transition: background 0.15s ease;

	&:active {
		background: rgba(0, 0, 0, 0.03);
	}

	&.is-expanded {
		border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	}
}

.category-color-strip {
	width: 4px;
	align-self: stretch;
	flex-shrink: 0;
}

.category-header-body {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 10px 14px 14px;
}

.category-name-text {
	font-size: 15px;
	font-weight: 700;
	color: var(--ion-color-dark, #1c1c1e);
	letter-spacing: -0.2px;
	flex: 1;
}

.category-count-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 20px;
	border-radius: 10px;
	background: var(--ion-color-light, #f4f5f8);
	color: var(--ion-color-medium-shade);
	font-size: 11px;
	font-weight: 700;
	padding: 0 6px;
}

.category-chevron {
	font-size: 16px;
	color: var(--ion-color-medium);
	margin-right: 14px;
	flex-shrink: 0;
	transition: transform 0.25s var(--ease-out);

	&.rotated {
		transform: rotate(180deg);
	}
}

.category-services {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.28s ease-out;

	&.is-visible {
		max-height: 2000px;
		transition: max-height 0.4s ease-in;
	}
}

// ============================================================
// SERVICE ROW (inside accordion)
// ============================================================

.service-row {
	display: flex;
	align-items: center;
	cursor: pointer;
	background: var(--ion-card-background, #fff);
	border-bottom: 1px solid rgba(0, 0, 0, 0.04);
	transition: background 0.12s ease;

	&:last-child {
		border-bottom: none;
	}

	&:active {
		background: rgba(0, 0, 0, 0.03);
	}

	&.is-selected {
		background: rgba(var(--ion-color-primary-rgb), 0.05);

		.sr-name {
			color: var(--ion-color-primary);
			font-weight: 700;
		}

		.sr-dur {
			color: rgba(var(--ion-color-primary-rgb), 0.65);
		}

		.sr-accent {
			opacity: 1;
		}
	}

	&.is-additional {
		background: rgba(var(--ion-color-success-rgb), 0.04);

		.sr-name {
			color: var(--ion-color-success-shade);
			font-weight: 600;
		}
	}
}

.sr-accent {
	width: 3px;
	align-self: stretch;
	flex-shrink: 0;
	opacity: 0.5;
}

.sr-body {
	flex: 1;
	padding: 12px 8px 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sr-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--ion-color-dark);
	letter-spacing: -0.1px;
}

.sr-dur {
	font-size: 12px;
	color: var(--ion-color-medium);
	font-weight: 500;
}

.sr-end {
	padding: 0 14px;
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.sr-icon {
	font-size: 20px;
	transition: transform 0.15s var(--spring);
}

.si-selected {
	color: var(--ion-color-primary);
}

.si-additional {
	color: var(--ion-color-success);
}

.si-addmore {
	color: var(--ion-color-medium);
	font-size: 22px;
}

.si-arrow {
	font-size: 14px;
	color: var(--ion-color-medium-shade);
}

// ============================================================
// BOOKING BAR (sticky bottom)
// ============================================================

.booking-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100;
	padding: 10px 16px calc(env(safe-area-inset-bottom) + 10px);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-top: 1px solid rgba(0, 0, 0, 0.07);
	animation: slideUpBar 0.3s var(--spring) both;
}

@keyframes slideUpBar {
	from {
		opacity: 0;
		transform: translateY(100%);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.booking-bar-inner {
	display: flex;
	align-items: center;
	gap: 14px;
}

.booking-bar-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.booking-bar-service {
	font-size: 14px;
	font-weight: 700;
	color: var(--ion-color-dark, #1c1c1e);
	letter-spacing: -0.2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.booking-bar-meta {
	font-size: 12px;
	color: var(--ion-color-medium);
	font-weight: 500;
}

.booking-bar-btn {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 13px 22px;
	background: linear-gradient(135deg, var(--ion-color-primary), var(--ion-color-primary-shade));
	color: #fff;
	border: none;
	border-radius: 14px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.2px;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(var(--ion-color-primary-rgb), 0.35);
	transition: transform 0.12s var(--spring), box-shadow 0.12s ease;

	ion-icon {
		font-size: 17px;
	}

	&:active {
		transform: scale(0.96);
		box-shadow: 0 2px 8px rgba(var(--ion-color-primary-rgb), 0.25);
	}
}

// ============================================================
// APPOINTMENT CARDS
// ============================================================

.apt-cards {
	padding: 0 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.apt-card {
	display: flex;
	align-items: center;
	background: var(--ion-card-background, #fff);
	border-radius: var(--item-radius);
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04);
	cursor: pointer;
	transition: transform 0.13s var(--spring);

	&:active {
		transform: scale(0.98);
	}
}

.apt-card-accent {
	width: 4px;
	align-self: stretch;
	flex-shrink: 0;
}

.apt-card-body {
	flex: 1;
	min-width: 0;
	padding: 13px 10px 13px 14px;
}

.apt-card-name {
	font-size: 15px;
	font-weight: 650;
	color: var(--ion-color-dark, #1c1c1e);
	margin-bottom: 4px;
	letter-spacing: -0.1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.apt-card-date {
	font-size: 12px;
	color: var(--ion-color-medium);
	font-weight: 500;
}

.apt-status-badge {
	flex-shrink: 0;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	padding: 4px 9px;
	border-radius: 8px;
	letter-spacing: 0.2px;
	text-transform: uppercase;
	margin-right: 14px;
}

// ============================================================
// INFO / ABOUT SECTION
// ============================================================

.about-section {
	padding: 16px;
}

.about-block {
	margin-bottom: 24px;
}

.about-title {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.4px;
	color: var(--ion-color-dark);
	margin: 0 0 12px;
}

.about-text {
	font-size: 14px;
	line-height: 1.65;
	color: var(--ion-color-medium-shade);
	margin: 0;
}

.info-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	font-size: 14px;
	color: var(--ion-color-medium-shade);
	font-weight: 500;

	ion-icon {
		font-size: 16px;
		flex-shrink: 0;
	}
}

.hours-list {
	display: flex;
	flex-direction: column;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.hours-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 11px 14px 11px 18px;
	background: var(--ion-card-background, #fff);
	font-size: 14px;
	position: relative;
	border-bottom: 1px solid rgba(0, 0, 0, 0.04);

	&:last-child {
		border-bottom: none;
	}

	&::before {
		content: '';
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		width: 3px;
		background: transparent;
	}

	&.hours-today {
		background: rgba(var(--ion-color-primary-rgb), 0.05);

		&::before {
			background: var(--ion-color-primary);
		}

		.hours-day {
			color: var(--ion-color-primary);
			font-weight: 700;
		}

		.hours-time {
			color: var(--ion-color-primary-shade);
			font-weight: 600;
		}
	}

	&.hours-closed {
		background: var(--ion-card-background, #fff);

		.hours-day {
			color: var(--ion-color-medium);
			font-weight: 400;
		}
	}
}

.hours-day {
	color: var(--ion-color-dark);
	font-weight: 500;
	font-size: 14px;
	flex: 1;
}

.hours-time {
	color: var(--ion-color-medium-shade);
	font-size: 13px;
	font-weight: 500;
	text-align: right;

	&.closed {
		display: inline-flex;
		align-items: center;
		background: rgba(var(--ion-color-danger-rgb), 0.08);
		color: var(--ion-color-danger);
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.4px;
		text-transform: uppercase;
		padding: 3px 8px;
		border-radius: 6px;
	}
}

.profile-list {
	border-radius: 14px;
	overflow: hidden;
	background: var(--ion-card-background, #fff);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04);

	ion-item {
		--padding-start: 16px;
		--inner-padding-end: 16px;
	}
}

// ============================================================
// GALLERY
// ============================================================

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	padding: 12px 16px;
}

.gallery-item {
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-photo {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	display: block;
}

.gallery-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
	color: #fff;
	font-size: 11px;
	padding: 20px 8px 7px;
	text-align: center;
	font-weight: 500;
}

// ============================================================
// CHAT INIT MODAL
// ============================================================

.chat-init-modal {
	--border-radius: 28px 28px 0 0;
	--backdrop-opacity: 0.5;

	ion-backdrop {
		--backdrop-opacity: 0.5;
		backdrop-filter: blur(4px);
	}
}

.chat-modal-wrap {
	display: flex;
	flex-direction: column;
	padding: 0 0 calc(env(safe-area-inset-bottom) + 16px);
	background: #ffffff;
	border-radius: 28px 28px 0 0;
	min-height: 100%;

	animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modalSlideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.modal-handle-bar {
	width: 40px;
	height: 5px;
	background: #e0e0e0;
	border-radius: 3px;
	margin: 14px auto 0;
	flex-shrink: 0;
}

.chat-modal-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px 24px 0;
	animation: fadeUp 0.4s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.company-avatar-ring {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	padding: 2px;
	background: linear-gradient(135deg, #f0f0f0, #d8d8d8);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
}

.company-avatar-circle {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid rgba(255, 255, 255, 0.6);

	span {
		font-size: 20px;
		font-weight: 700;
		color: #ffffff;
		letter-spacing: -0.5px;
		text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	}
}

.chat-modal-company-info {
	flex: 1;
	min-width: 0;
}

.chat-company-name {
	font-size: 18px;
	font-weight: 700;
	color: #111;
	margin: 0 0 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: -0.3px;
}

.chat-company-sub {
	font-size: 13px;
	color: #888;
	margin: 0;
	font-weight: 400;
}

.chat-modal-divider {
	height: 1px;
	background: linear-gradient(to right, transparent, #e8e8e8 20%, #e8e8e8 80%, transparent);
	margin: 20px 24px 0;
	animation: fadeUp 0.4s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chat-textarea-wrap {
	padding: 16px 20px 0;
	position: relative;
	animation: fadeUp 0.4s 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;

	.chat-textarea {
		--background: #f7f7f9;
		--border-radius: 16px;
		--padding-top: 14px;
		--padding-bottom: 14px;
		--padding-start: 16px;
		--padding-end: 16px;
		--placeholder-color: #aaa;
		--placeholder-opacity: 1;
		font-size: 15px;
		color: #111;
		border-radius: 16px;
		border: 1.5px solid transparent;
		transition: border-color 0.2s ease, box-shadow 0.2s ease;

		&:focus-within,
		&.has-focus {
			border-color: rgba(0, 122, 255, 0.3);
			box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.08);
		}
	}
}

.char-counter {
	text-align: right;
	font-size: 11px;
	color: #bbb;
	padding: 6px 4px 0;
	font-variant-numeric: tabular-nums;
}

.chat-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 20px 8px;
	animation: fadeUp 0.4s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chat-send-btn {
	width: 100%;
	padding: 16px;
	border: none;
	border-radius: 16px;
	background: linear-gradient(135deg, #007aff, #0055cc);
	color: white;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.2px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 4px 16px rgba(0, 122, 255, 0.35), 0 1px 4px rgba(0, 122, 255, 0.2);
	transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
		box-shadow 0.15s ease,
		opacity 0.15s ease;

	ion-icon {
		font-size: 18px;
	}

	&:active:not(:disabled) {
		transform: scale(0.97);
		box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
	}

	&.sending {
		background: linear-gradient(135deg, #5ba8ff, #3378e0);
		opacity: 0.85;
		box-shadow: none;
	}

	&:disabled {
		cursor: default;
	}

	.btn-label {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	.btn-loading {
		display: flex;
		align-items: center;
	}
}

.chat-cancel-btn {
	width: 100%;
	padding: 12px;
	border: none;
	background: transparent;
	color: #888;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	border-radius: 12px;
	transition: color 0.15s ease, background 0.15s ease;

	&:active:not(:disabled) {
		color: #555;
		background: #f0f0f0;
	}

	&:disabled {
		opacity: 0.4;
		cursor: default;
	}
}

// ============================================================
// RECENSIONI
// ============================================================

.reviews-summary {
	display: flex;
	gap: 16px;
	padding: 16px;
	background: var(--ion-color-light, #f8fafc);
	border-radius: 16px;
	margin-bottom: 16px;
}

.rs-avg {
	text-align: center;
	min-width: 90px;
}

.rs-avg-value {
	font-size: 2.2rem;
	font-weight: 800;
	line-height: 1;
	color: var(--ion-text-color, #1e293b);
}

.rs-count {
	font-size: 12px;
	color: var(--ion-color-medium, #64748b);
	margin-top: 4px;
}

.rs-dist {
	flex: 1;
}

.rs-dist-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.rs-dist-stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	width: 28px;
	font-size: 12px;
	color: var(--ion-color-medium, #64748b);

	ion-icon {
		color: #f59e0b;
		font-size: 11px;
	}
}

.rs-dist-bar {
	flex: 1;
	height: 7px;
	background: var(--ion-color-step-150, #e2e8f0);
	border-radius: 4px;
	overflow: hidden;
}

.rs-dist-fill {
	height: 100%;
	background: #f59e0b;
}

.rs-dist-count {
	width: 24px;
	text-align: right;
	font-size: 12px;
	color: var(--ion-color-medium, #64748b);
}

.reviews-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 12px;
}

// Stelle: base in global.scss, qui solo l'override di dimensione
.review-stars ion-icon {
	font-size: 18px;
}

.review-card {
	border: 1px solid var(--ion-color-step-150, #e2e8f0);
	border-radius: 14px;
	padding: 12px 14px;
	margin-bottom: 12px;
}

.review-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.review-title {
	font-weight: 600;
	margin-top: 6px;
}

.review-text {
	font-size: 14px;
	color: var(--ion-color-medium-shade, #475569);
	margin: 6px 0;
	white-space: pre-wrap;
}

.review-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 12px;
	color: var(--ion-color-medium, #64748b);
}

.review-service-tag {
	color: #fff;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
}
