/* TSG Agendamento - Modal Premium */
.tsg-agendamento-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}
.tsg-agendamento-overlay[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}
.tsg-agendamento-modal {
	background: #fff;
	border-radius: 24px;
	max-width: 460px;
	width: 100%;
	max-height: 92vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
	transform: scale(0.96) translateY(8px);
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
}
.tsg-agendamento-overlay[aria-hidden="false"] .tsg-agendamento-modal {
	transform: scale(1) translateY(0);
}
.tsg-agendamento-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	border: none;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #fff;
	z-index: 2;
	transition: background 0.2s, transform 0.15s;
}
.tsg-agendamento-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.05);
}
.tsg-agendamento-modal-header {
	background: linear-gradient(145deg, var(--tsg-primary, #2563eb) 0%, color-mix(in srgb, var(--tsg-primary, #2563eb) 75%, #0f172a 25%) 100%);
	color: #fff;
	padding: 32px 28px 28px;
	text-align: center;
	position: relative;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.tsg-agendamento-logo {
	max-height: 60px;
	width: auto;
	object-fit: contain;
}
.tsg-agendamento-titulo {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.2;
}
.tsg-agendamento-subtitulo {
	margin: 8px 0 0;
	opacity: 0.92;
	font-size: 0.95rem;
	font-weight: 500;
}
/* Barra de etapas */
.tsg-agendamento-steps-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 16px 24px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}
.tsg-step-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #cbd5e1;
	transition: background 0.25s, transform 0.2s;
}
.tsg-step-dot.active {
	background: var(--tsg-primary, #2563eb);
	transform: scale(1.2);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.tsg-step-dot.done {
	background: var(--tsg-primary, #2563eb);
	opacity: 0.6;
}
.tsg-step-line {
	width: 24px;
	height: 2px;
	background: #e2e8f0;
	border-radius: 1px;
}
.tsg-agendamento-modal-body {
	padding: 28px;
	overflow-y: auto;
	flex: 1;
}
.tsg-agendamento-form label {
	display: block;
	font-weight: 600;
	font-size: 0.875rem;
	color: #0f172a;
	margin-bottom: 8px;
	margin-top: 18px;
	letter-spacing: -0.01em;
}
.tsg-agendamento-form label:first-child { margin-top: 0; }
.tsg-agendamento-step-label {
	margin-bottom: 12px;
	display: block;
	font-size: 0.9rem;
}
/* Grid profissionais */
.tsg-profissionais-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 14px;
	margin-top: 10px;
	min-height: 100px;
}
.tsg-profissional-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s ease, background 0.2s ease;
	text-align: center;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.tsg-profissional-card:hover {
	border-color: var(--tsg-primary, #2563eb);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
	background: #fcfdff;
}
.tsg-profissional-card:focus {
	outline: none;
	border-color: var(--tsg-primary, #2563eb);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}
.tsg-profissional-card-selected {
	border-color: var(--tsg-primary, #2563eb);
	background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%);
	box-shadow: 0 0 0 2px var(--tsg-primary, #2563eb), 0 8px 20px rgba(37, 99, 235, 0.15);
}
.tsg-profissional-card-foto {
	width: 100%;
	aspect-ratio: 1;
	min-height: 100px;
	max-height: 140px;
	background-size: contain;
	background-position: center;
	background-color: #f1f5f9;
	background-repeat: no-repeat;
	flex-shrink: 0;
	border-radius: 0 !important;
}
.tsg-profissional-card-foto:not([style*="url("]) {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
	background-size: 40px 40px;
}
.tsg-profissional-card-foto {
	position: relative;
}
.tsg-foto-pro-badge {
	position: absolute;
	bottom: 4px;
	right: 4px;
	background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
}
.tsg-profissional-card-nome {
	font-size: 0.85rem;
	font-weight: 700;
	color: #0f172a;
	padding: 12px 8px 2px;
	line-height: 1.25;
	display: block;
	letter-spacing: -0.01em;
}
.tsg-profissional-card-especialidade {
	font-size: 0.72rem;
	color: #64748b;
	padding: 0 8px 12px;
	display: block;
	line-height: 1.3;
	font-weight: 500;
}
.tsg-agendamento-loading,
.tsg-agendamento-empty,
.tsg-agendamento-error {
	margin: 0;
	padding: 14px;
	color: #64748b;
	font-size: 0.9rem;
	grid-column: 1 / -1;
}
.tsg-agendamento-error { color: #dc2626; }
/* Grid de horários com cores */
.tsg-horarios-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
	gap: 10px;
	margin-bottom: 12px;
	display: none;
	align-items: stretch;
}
.tsg-horarios-grid:not([aria-hidden="true"]) { display: grid; }
.tsg-slot {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 44px;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 10px 8px !important;
	border-radius: 10px !important;
	border: 2px solid transparent;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.2s;
}
.tsg-slot:not(:disabled):hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.tsg-slot-disponivel {
	background: #dcfce7;
	color: #166534;
	border-color: #86efac;
}
.tsg-slot-disponivel.tsg-slot-selected {
	background: var(--tsg-primary, #2563eb);
	color: #fff;
	border-color: var(--tsg-primary, #2563eb);
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.tsg-slot-ocupado {
	background: #fee2e2;
	color: #991b1b;
	border-color: #fecaca;
	cursor: not-allowed;
	opacity: 0.9;
}
.tsg-slot-fora_expediente {
	background: #fef9c3;
	color: #854d0e;
	border-color: #fde047;
	cursor: not-allowed;
	opacity: 0.85;
}
.tsg-horarios-legenda {
	font-size: 0.75rem;
	color: #64748b;
	margin: 8px 0 0;
	display: none;
}
.tsg-horarios-legenda:not([aria-hidden="true"]) { display: block; }
.tsg-legenda-item {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 4px;
	vertical-align: middle;
	margin-right: 2px;
}
.tsg-legenda-disponivel { background: #22c55e; }
.tsg-legenda-ocupado { background: #ef4444; }
.tsg-legenda-fora { background: #eab308; }
#tsg-horarios-container select[style*="display: none"],
#tsg-horarios-container select[aria-hidden="true"] { display: none !important; }
.tsg-agendamento-message.success {
	color: #0f172a;
}
.tsg-msg-maps-wrap { display: block; margin-top: 12px; }
.tsg-agendamento-message.success .tsg-msg-link {
	display: inline-block;
	background: #0f172a;
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 10px;
	margin-top: 4px;
	transition: background 0.2s, transform 0.1s;
}
.tsg-agendamento-message.success .tsg-msg-link:hover {
	background: #1e293b;
	opacity: 1;
	color: #fff !important;
	transform: translateY(-1px);
}
/* Inputs premium */
.tsg-agendamento-form select,
.tsg-agendamento-form input[type="text"],
.tsg-agendamento-form input[type="email"],
.tsg-agendamento-form input[type="tel"],
.tsg-agendamento-form input[type="date"],
.tsg-agendamento-form textarea {
	width: 100%;
	padding: 14px 16px;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	font-size: 1rem;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
	background: #fafafa;
}
.tsg-agendamento-form select:focus,
.tsg-agendamento-form input:focus,
.tsg-agendamento-form textarea:focus {
	outline: none;
	border-color: var(--tsg-primary, #2563eb);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
	background: #fff;
}
.tsg-agendamento-form textarea {
	resize: vertical;
	min-height: 72px;
}
.tsg-agendamento-actions {
	margin-top: 26px;
}
.tsg-agendamento-btn-submit {
	width: 100%;
	padding: 16px 24px;
	background: linear-gradient(135deg, var(--tsg-submit-bg, var(--tsg-primary, #2563eb)) 0%, color-mix(in srgb, var(--tsg-submit-bg, var(--tsg-primary, #2563eb)) 88%, #0f172a 12%) 100%);
	color: var(--tsg-submit-text, #fff);
	border: none;
	border-radius: 14px;
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.2s;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
	letter-spacing: -0.01em;
}
.tsg-agendamento-btn-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.tsg-agendamento-btn-submit:active {
	transform: translateY(0);
}
.tsg-agendamento-btn-submit:disabled {
	opacity: 0.75;
	cursor: not-allowed;
	transform: none;
}
.tsg-agendamento-message {
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: 12px;
	font-size: 0.9rem;
	display: none;
	font-weight: 500;
}
.tsg-agendamento-message.success {
	display: block;
	background: #ecfdf5;
	color: #0f172a;
	border: 1px solid #a7f3d0;
}
.tsg-agendamento-message.error {
	display: block;
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}
.tsg-agendamento-modal-footer {
	padding: 14px 28px;
	text-align: center;
	border-top: 1px solid #f1f5f9;
	background: #f8fafc;
}
.tsg-agendamento-credits {
	font-size: 0.75rem;
	color: #64748b;
	text-decoration: none;
	transition: color 0.2s;
}
.tsg-agendamento-credits:hover {
	color: var(--tsg-primary, #2563eb);
}
.tsg-agendamento-trigger {
	padding: 14px 28px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 1rem;
	border: none;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.tsg-agendamento-trigger:hover {
	opacity: 0.95;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.tsg-agendamento-trigger:active {
	transform: translateY(0);
}
.tsg-agendamento-inline {
	max-width: 980px;
	max-height: none;
	transform: none;
	margin: 0 auto;
	border-radius: 18px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 16px 40px rgba(2, 6, 23, 0.08);
}
.tsg-agendamento-inline .tsg-agendamento-modal-body {
	padding: 30px;
}
.tsg-agendamento-inline .tsg-profissionais-grid {
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.tsg-agendamento-inline .tsg-agendamento-actions {
	max-width: 380px;
	margin-left: auto;
	margin-right: auto;
}
.tsg-agendamento-inline .tsg-agendamento-subtitulo {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}
.tsg-agendamento-modal.estilo-clean {
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}
.tsg-agendamento-modal.estilo-clean .tsg-agendamento-modal-header {
	background: #0f172a;
}
.tsg-agendamento-modal.estilo-glass .tsg-agendamento-modal-header {
	background: linear-gradient(135deg, rgba(30,41,59,0.88), rgba(37,99,235,0.82));
	backdrop-filter: blur(6px);
}
.tsg-consent-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	font-size: 0.9rem;
	color: #475569;
	cursor: pointer;
}
.tsg-consent-label input[type="checkbox"] {
	margin-top: 4px;
	flex-shrink: 0;
}
