/* =============================================
   WooCommerce Mensajero — Estilos móviles
   Optimizado para uso desde celular en campo
   ============================================= */

/* ---- Reset & base ---- */
.wme-wrap *,
.wme-wrap *::before,
.wme-wrap *::after {
	box-sizing: border-box;
}

/* ---- Contenedor principal ---- */
.wme-wrap {
	max-width: 480px;
	margin: 0 auto;
	padding: 16px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* En móviles pequeños: sin padding lateral, ocupa toda la pantalla */
@media (max-width: 480px) {
	.wme-wrap {
		padding: 0;
	}
}

/* ---- Tarjeta ---- */
.wme-card {
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	overflow: hidden;
}

@media (max-width: 480px) {
	.wme-card {
		border-radius: 0;
		min-height: 100svh;   /* altura segura en móviles con barra de estado */
		box-shadow: none;
		display: flex;
		flex-direction: column;
	}
}

/* ---- Cabecera ---- */
.wme-header {
	background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%);
	color: #ffffff;
	text-align: center;
	padding: 36px 24px 28px;
}

.wme-header__icon {
	font-size: 52px;
	line-height: 1;
	margin-bottom: 10px;
	display: block;
}

.wme-header__title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
}

.wme-header__subtitle {
	margin: 0;
	font-size: 15px;
	opacity: 0.88;
	font-weight: 500;
}

/* ---- Cuerpo ---- */
.wme-body {
	padding: 24px;
	flex: 1;
}

/* ---- Pie ---- */
.wme-footer {
	padding: 12px 24px 28px;
	text-align: center;
}

.wme-footer p {
	margin: 0;
	font-size: 13px;
	color: #9e9e9e;
}

/* ---- Alertas ---- */
.wme-alert {
	padding: 14px 18px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 500;
	margin-bottom: 20px;
	text-align: center;
	line-height: 1.5;
}

.wme-alert--success {
	background: #e8f5e9;
	color: #1b5e20;
	border: 1px solid #a5d6a7;
}

.wme-alert--error {
	background: #ffebee;
	color: #b71c1c;
	border: 1px solid #ef9a9a;
}

/* ---- Formulario ---- */
.wme-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.wme-form__group {
	margin-bottom: 22px;
}

.wme-form__label {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #212121;
	margin-bottom: 10px;
}

.wme-form__hint {
	font-size: 13px;
	color: #757575;
	margin: 8px 0 0;
	text-align: center;
}

/* ---- Inputs de texto ---- */
.wme-input {
	width: 100%;
	padding: 16px 18px;
	font-size: 18px;
	border: 2px solid #e0e0e0;
	border-radius: 14px;
	background: #fafafa;
	color: #212121;
	transition: border-color 0.2s, box-shadow 0.2s;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
}

.wme-input:focus {
	border-color: #43a047;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.18);
}

.wme-input--center {
	text-align: center;
}

/* Input extra grande para número de pedido */
.wme-input--xl {
	font-size: 28px;
	font-weight: 700;
	padding: 18px;
	letter-spacing: 3px;
}

/* ---- Área de foto ---- */
.wme-photo {
	position: relative;
	min-height: 180px;
	border: 3px dashed #66bb6a;
	border-radius: 16px;
	background: #f1fdf2;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	overflow: hidden;
	transition: background 0.2s, border-color 0.2s;
}

.wme-photo:active,
.wme-photo:focus-within {
	background: #e8f5e9;
	border-color: #2e7d32;
}

/* Placeholder (sin foto seleccionada) */
.wme-photo__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 24px;
	text-align: center;
	pointer-events: none;
	color: #388e3c;
}

.wme-photo__icon {
	font-size: 52px;
	line-height: 1;
	display: block;
}

.wme-photo__text {
	font-size: 15px;
	font-weight: 600;
	color: #2e7d32;
}

.wme-photo__hint {
	font-size: 13px;
	color: #66bb6a;
}

/* Vista previa de la foto */
.wme-photo__preview {
	width: 100%;
	pointer-events: none;
}

.wme-photo__preview img {
	width: 100%;
	max-height: 260px;
	object-fit: cover;
	display: block;
}

.wme-photo__badge {
	background: #43a047;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	padding: 10px;
	text-align: center;
}

/* Input file oculto que cubre todo el área táctil */
.wme-photo__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	font-size: 0; /* evita comportamiento raro en iOS */
}

/* ---- Botones ---- */
.wme-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 24px;
	border: none;
	border-radius: 14px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	line-height: 1;
	white-space: nowrap;
}

.wme-btn--block {
	width: 100%;
}

/* Botón extra grande para confirmar */
.wme-btn--xl {
	padding: 20px 24px;
	font-size: 18px;
	border-radius: 16px;
}

/* Verde primario (login) */
.wme-btn--primary {
	background: #2e7d32;
	color: #ffffff;
	box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35);
}

.wme-btn--primary:hover {
	background: #1b5e20;
}

.wme-btn--primary:active {
	transform: scale(0.98);
}

/* Verde degradado (confirmar entrega — más prominente) */
.wme-btn--success {
	background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
	color: #ffffff;
	box-shadow: 0 6px 20px rgba(67, 160, 71, 0.45);
}

.wme-btn--success:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(67, 160, 71, 0.55);
}

.wme-btn--success:active {
	transform: scale(0.98);
	box-shadow: 0 3px 10px rgba(67, 160, 71, 0.3);
}

/* Fantasma (cerrar sesión) */
.wme-btn--ghost {
	background: transparent;
	color: #757575;
	border: 1px solid #e0e0e0;
	font-size: 14px;
	padding: 10px 20px;
	border-radius: 10px;
}

.wme-btn--ghost:hover {
	background: #f5f5f5;
}

/* Estado deshabilitado */
.wme-btn:disabled,
.wme-btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none !important;
}

/* Spinner de carga (animación via keyframes) */
.wme-btn__loading::before {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: wme-spin 0.7s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}

@keyframes wme-spin {
	to { transform: rotate(360deg); }
}
