/* ============================================================
   Agendamiento con Pago — Estilos Públicos
   SA Publicidad
   ============================================================ */

/* Variables dinámicas (se sobreescriben desde PHP) */
:root {
	--acp-color:      #2c3e6b;
	--acp-color-d:    #1e2d50;
	--acp-color-l:    #3d5485;
	--acp-success:    #27ae60;
	--acp-warning:    #e67e22;
	--acp-danger:     #e74c3c;
	--acp-border:     #e0e4ed;
	--acp-bg:         #f5f7fb;
	--acp-text:       #2d3748;
	--acp-text-light: #718096;
	--acp-radius:     10px;
	--acp-shadow:     0 2px 12px rgba(0,0,0,.08);
}

/* ── Contenedor principal ─────────────────────────────────── */
.acp-widget {
	max-width: 860px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	color: var(--acp-text);
}

/* ── Pasos (steps) ────────────────────────────────────────── */
.acp-steps {
	display: flex;
	background: var(--acp-bg);
	border-bottom: 1px solid var(--acp-border);
	overflow-x: auto;
}
.acp-step {
	flex: 1;
	min-width: 100px;
	text-align: center;
	padding: 12px 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--acp-text-light);
	border-bottom: 3px solid transparent;
	white-space: nowrap;
	transition: all .2s;
}
.acp-step.activo  { color: var(--acp-color); border-bottom-color: var(--acp-color); }
.acp-step.completo{ color: var(--acp-success); border-bottom-color: var(--acp-success); }
.acp-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px; height: 24px;
	border-radius: 50%;
	background: var(--acp-border);
	color: var(--acp-text-light);
	font-weight: 700;
	font-size: 12px;
	margin-right: 5px;
}
.acp-step.activo  .acp-step-num { background: var(--acp-color); color: #fff; }
.acp-step.completo .acp-step-num { background: var(--acp-success); color: #fff; }

/* ── Paneles de paso ──────────────────────────────────────── */
.acp-panel { display: none; padding: 28px; background: #fff; }
.acp-panel.activo { display: block; }
.acp-panel-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 28px;
	border-top: 1px solid var(--acp-border);
	background: var(--acp-bg);
	border-radius: 0 0 var(--acp-radius) var(--acp-radius);
}

/* ── Grillas de selección ─────────────────────────────────── */
.acp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
	margin-top: 16px;
}
.acp-grid-vacio,
.acp-slots-grid.acp-grid-vacio,
.acp-calendario.acp-grid-vacio {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 170px;
}
.acp-opcion {
	border: 2px solid var(--acp-border);
	border-radius: 8px;
	padding: 14px 12px;
	cursor: pointer;
	transition: all .18s;
	text-align: center;
	background: #fff;
	position: relative;
}
.acp-opcion:hover { border-color: var(--acp-color); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.acp-opcion.seleccionado { border-color: var(--acp-color); background: rgba(44,62,107,.05); }
.acp-opcion-check {
	display: none;
	position: absolute;
	top: 8px; right: 8px;
	width: 18px; height: 18px;
	background: var(--acp-color);
	border-radius: 50%;
	color: #fff;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
}
.acp-opcion.seleccionado .acp-opcion-check { display: block; }
.acp-opcion-nombre { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.acp-opcion-detalle { font-size: 12px; color: var(--acp-text-light); }
.acp-opcion-precio { font-size: 15px; font-weight: 700; color: var(--acp-color); margin-top: 6px; }
.acp-opcion-avatar {
	width: 56px; height: 56px !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 auto 10px !important;
}
.acp-opcion-avatar-placeholder {
	width: 56px; height: 56px;
	border-radius: 50%;
	background: var(--acp-bg);
	display: flex; align-items: center; justify-content: center;
	margin: 0 auto 10px;
	font-size: 22px; color: var(--acp-color);
}

/* ── Calendario de fechas ─────────────────────────────────── */
.acp-calendario {
	user-select: none;
	max-width: 380px;
	margin: 0 auto;
}
.acp-cal-nav {
	display: flex; align-items: center; justify-content: space-between;
	margin-bottom: 12px;
}
.acp-cal-nav button {
	background: none; border: 1px solid var(--acp-border); border-radius: 6px;
	width: 34px; height: 34px; cursor: pointer; font-size: 16px;
	color: var(--acp-color); transition: background .15s;
}
.acp-cal-nav button:hover { background: var(--acp-bg); }
.acp-cal-titulo { font-weight: 700; font-size: 16px; color: var(--acp-color); text-transform: capitalize; }
.acp-cal-grid {
	display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
	text-align: center;
}
.acp-cal-dia-nombre {
	font-size: 11px; font-weight: 600; color: var(--acp-text-light);
	text-transform: uppercase; padding: 4px 0;
}
.acp-cal-dia {
	padding: 7px 0; border-radius: 6px; font-size: 13px; font-weight: 500;
	cursor: default; color: var(--acp-text-light);
}
.acp-cal-dia.disponible {
	background: var(--acp-bg); color: var(--acp-text); cursor: pointer;
	transition: background .15s;
}
.acp-cal-dia.disponible:hover { background: rgba(44,62,107,.1); }
.acp-cal-dia.seleccionado { background: var(--acp-color) !important; color: #fff !important; }
.acp-cal-dia.hoy { font-weight: 700; }
.acp-cal-dia.pasado { opacity: .35; }

/* ── Estados vacíos ───────────────────────────────────────── */
.acp-empty-state {
	max-width: 360px;
	margin: 18px auto 0;
	padding: 24px 22px;
	text-align: center;
	border-radius: 12px;
}
.acp-empty-state-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--acp-color);
	margin-bottom: 8px;
}
.acp-empty-state-text {
	font-size: 14px;
	line-height: 1.55;
	color: var(--acp-text-light);
}


.acp-empty-state-error {
	border-left: 4px solid var(--acp-danger);
}

/* ── Slots de hora ────────────────────────────────────────── */
.acp-slots-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px;
	margin-top: 16px;
}
.acp-slot {
	border: 2px solid var(--acp-border); border-radius: 6px;
	padding: 10px 6px; text-align: center; cursor: pointer;
	font-size: 14px; font-weight: 600; transition: all .15s;
	background: #fff; color: var(--acp-text);
}
.acp-slot:hover  { border-color: var(--acp-color); color: var(--acp-color); background: var(--acp-bg); }
.acp-slot.seleccionado { border-color: var(--acp-color); background: var(--acp-color); color: #fff; }

/* ── Formulario del cliente ───────────────────────────────── */
.acp-form-cliente { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.acp-campo { display: flex; flex-direction: column; margin-bottom: 16px; }
.acp-campo label { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--acp-text); }
.acp-campo input, .acp-campo textarea, .acp-campo select {
	border: 1.5px solid var(--acp-border); border-radius: 6px;
	padding: 8px 12px; font-size: 14px; transition: border-color .2s;
	background: #fff; color: var(--acp-text);
}
.acp-campo input:focus, .acp-campo textarea:focus {
	border-color: var(--acp-color); outline: none;
	box-shadow: 0 0 0 3px rgba(44,62,107,.1);
}
.acp-campo-full { grid-column: 1 / -1; }
.acp-campo-error .acp-campo input { border-color: var(--acp-danger); }
.acp-campo-msg-error { font-size: 12px; color: var(--acp-danger); margin-top: 3px; }
.acp-req { color: var(--acp-danger); }

/* ── Resumen de reserva ───────────────────────────────────── */
.acp-resumen {
	background: var(--acp-bg); border-radius: 8px;
	padding: 20px; margin-bottom: 20px;
}
.acp-resumen h3 { margin: 0 0 14px; font-size: 16px; color: var(--acp-color); }
.acp-resumen-fila { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--acp-border); font-size: 14px; }
.acp-resumen-fila:last-child { border: none; }
.acp-resumen-fila strong { color: var(--acp-text-light); font-weight: 500; }
.acp-resumen-total { font-size: 18px; font-weight: 700; color: var(--acp-color); }
.acp-forma-pago { margin-top: 16px; }
.acp-forma-pago label { font-weight: 600; font-size: 14px; margin-bottom: 8px; display: block; }
.acp-forma-pago select { width: 100%; padding: 8px 12px; border: 1.5px solid var(--acp-border); border-radius: 6px; font-size: 14px; }

/* ── Botones ──────────────────────────────────────────────── */
.acp-btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 22px; border-radius: 6px; font-size: 14px;
	font-weight: 600; cursor: pointer; border: none;
	transition: all .18s; text-decoration: none;
}
.acp-btn-primary { background: var(--acp-color); color: #fff; }
.acp-btn-primary:hover { background: var(--acp-color-d); color: #fff; }
.acp-btn-outline { background: transparent; color: var(--acp-color); border: 1.5px solid var(--acp-color); }
.acp-btn-outline:hover { background: var(--acp-bg); }
.acp-btn:disabled { opacity: .5; cursor: not-allowed; }
.acp-btn-sm { padding: 7px 16px; font-size: 13px; }

/* ── Confirmación final ───────────────────────────────────── */
.acp-confirmacion {
	text-align: center; padding: 40px 20px;
}
.acp-confirmacion-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 16px;
	color: var(--acp-success);
	filter: drop-shadow(0 6px 16px rgba(39, 174, 96, 0.18));
}
.acp-confirmacion-svg {
	width: 72px;
	height: 72px;
	display: block;
	fill: currentColor;
}
.acp-confirmacion h3 { font-size: 22px; color: var(--acp-success); margin-bottom: 8px; }
.acp-confirmacion p { color: var(--acp-text-light); font-size: 15px; }
.acp-btn-pagar { display: inline-block; margin-top: 20px; }

/* ── Spinner / Cargando ───────────────────────────────────── */
.acp-cargando {
	text-align: center; padding: 32px; color: var(--acp-text-light); font-size: 14px;
}
.acp-spinner {
	display: inline-block; width: 28px; height: 28px;
	border: 3px solid var(--acp-border);
	border-top-color: var(--acp-color);
	border-radius: 50%;
	animation: acp-spin .7s linear infinite;
	margin-bottom: 10px;
}
@keyframes acp-spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
	.acp-form-cliente { grid-template-columns: 1fr; }
	.acp-grid { grid-template-columns: 1fr 1fr; }
	.acp-panel { padding: 18px 16px; }
	.acp-empty-state { padding: 20px 16px; }
}
