/* Convertir XLS a XLSX — estilos del convertidor. Todo va dentro de .x2x para no chocar con el tema. */

.x2x {
	--x2x-accent: #0f766e;
	--x2x-ink: #111827;
	--x2x-muted: #6b7280;
	--x2x-line: #e5e7eb;
	--x2x-surface: #ffffff;
	--x2x-soft: #f9fafb;
	--x2x-ok: #e2f0d9;
	--x2x-ok-ink: #2f6b1a;
	--x2x-warn: #fff2cc;
	--x2x-warn-ink: #7a5b00;
	--x2x-err: #fce4e4;
	--x2x-err-ink: #9c0006;
	--x2x-radius: 14px;

	box-sizing: border-box;
	max-width: 860px;
	margin: 1.5em auto;
	color: var(--x2x-ink);
	font-size: 16px;
	line-height: 1.5;
}
.x2x *, .x2x *::before, .x2x *::after { box-sizing: inherit; }
.x2x [hidden] { display: none !important; }
.x2x svg { flex: none; }

/* ---------- Zona para soltar ---------- */

.x2x-drop {
	position: relative;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 6px; text-align: center;
	min-height: 190px; padding: 26px 16px;
	border: 2px dashed color-mix(in srgb, var(--x2x-accent) 35%, var(--x2x-line));
	border-radius: var(--x2x-radius);
	background: var(--x2x-soft);
	color: var(--x2x-muted);
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}
.x2x-drop:hover, .x2x-drop.is-over, .x2x-drop:focus-within {
	border-color: var(--x2x-accent);
	background: color-mix(in srgb, var(--x2x-accent) 6%, var(--x2x-surface));
	color: var(--x2x-ink);
}
.x2x-drop:focus-within { outline: 2px solid var(--x2x-accent); outline-offset: 2px; }
.x2x-drop__icon { color: var(--x2x-accent); margin-bottom: 4px; }
.x2x-drop__main { font-weight: 700; font-size: 18px; color: var(--x2x-ink); }
.x2x-drop__sub { font-size: 14px; }
.x2x-drop__btn {
	margin-top: 10px;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 20px; min-height: 44px; border-radius: 10px;
	background: var(--x2x-accent); color: #fff; font-weight: 600; font-size: 15px;
}
.x2x-drop:hover .x2x-drop__btn { background: color-mix(in srgb, var(--x2x-accent) 86%, #000); }

.x2x-input {
	position: absolute !important;
	width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap;
}

.x2x-notice {
	margin: 12px 0 0; padding: 10px 12px;
	border-radius: 10px; font-size: 14px;
	background: var(--x2x-err); color: var(--x2x-err-ink);
}

/* ---------- Lista de archivos ---------- */

.x2x-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.x2x .x2x-item {
	margin: 0;
	display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center;
	padding: 14px 16px;
	border: 1px solid var(--x2x-line); border-radius: 12px;
	background: var(--x2x-surface);
}
.x2x-item.is-done { border-color: color-mix(in srgb, var(--x2x-accent) 40%, var(--x2x-line)); }
.x2x-item.is-error { border-color: color-mix(in srgb, var(--x2x-err-ink) 30%, var(--x2x-line)); }
.x2x-item__icon {
	width: 40px; height: 40px; border-radius: 10px;
	display: grid; place-items: center;
	background: var(--x2x-soft); color: var(--x2x-muted);
	font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.x2x-item.is-done .x2x-item__icon { background: color-mix(in srgb, var(--x2x-accent) 12%, var(--x2x-surface)); color: var(--x2x-accent); }
.x2x-item.is-error .x2x-item__icon { background: var(--x2x-err); color: var(--x2x-err-ink); }
.x2x-item__info { min-width: 0; display: flex; flex-direction: column; }
.x2x-item__name { font-weight: 600; overflow-wrap: anywhere; }
.x2x-item__meta { font-size: 13px; color: var(--x2x-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.x2x-item.is-error .x2x-item__meta { color: var(--x2x-err-ink); }
.x2x-item__actions { display: flex; align-items: center; gap: 6px; }
.x2x-item__notes {
	grid-column: 2 / -1;
	margin: 6px 0 0; padding: 8px 12px;
	list-style: none;
	border-radius: 8px; background: var(--x2x-warn); color: var(--x2x-warn-ink);
	font-size: 13px;
}
.x2x .x2x-item__notes li { margin: 0; }
@media (max-width: 560px) {
	.x2x .x2x-item { grid-template-columns: auto 1fr; position: relative; padding-right: 46px; }
	.x2x-item__actions { display: contents; }
	.x2x .x2x-item__actions a.x2x-btn { grid-column: 1 / -1; margin: 8px -30px 0 0; white-space: nowrap; }
	.x2x .x2x-item__actions .x2x-btn--icon { position: absolute; top: 8px; right: 4px; }
	.x2x-item__notes { grid-column: 1 / -1; margin-right: -30px; }
}

.x2x-spinner {
	width: 14px; height: 14px; border-radius: 50%;
	border: 2px solid var(--x2x-line); border-top-color: var(--x2x-accent);
}
@media (prefers-reduced-motion: no-preference) {
	.x2x-spinner { animation: x2x-spin .8s linear infinite; }
}
@keyframes x2x-spin { to { transform: rotate(360deg); } }

/* ---------- Botones ---------- */

.x2x .x2x-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 9px 16px; min-height: 42px;
	border-radius: 10px; border: 1px solid transparent;
	font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.x2x .x2x-btn--primary { background: var(--x2x-accent); color: #fff; }
.x2x .x2x-btn--primary:hover, .x2x .x2x-btn--primary:focus { background: color-mix(in srgb, var(--x2x-accent) 86%, #000); color: #fff; }
.x2x .x2x-btn--ghost { background: var(--x2x-surface); color: var(--x2x-ink); border-color: var(--x2x-line); }
.x2x .x2x-btn--ghost:hover { border-color: var(--x2x-accent); color: var(--x2x-accent); }
.x2x .x2x-btn--icon { padding: 0; width: 38px; min-height: 38px; background: none; color: var(--x2x-muted); }
.x2x .x2x-btn--icon:hover { color: var(--x2x-err-ink); background: var(--x2x-soft); }
.x2x .x2x-btn:focus-visible { outline: 2px solid var(--x2x-accent); outline-offset: 2px; }
.x2x .x2x-btn[aria-busy="true"] { cursor: progress; opacity: .75; }

.x2x-bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
	margin-top: 14px;
}
.x2x-bar__summary { font-size: 14px; color: var(--x2x-muted); }
.x2x-bar__buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Privacidad y detalles ---------- */

.x2x .x2x-privacy {
	display: flex; align-items: center; justify-content: center; gap: 6px;
	margin: 14px 0 0; font-size: 13px; color: var(--x2x-muted); text-align: center;
}
.x2x .x2x-privacy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; }
.x2x .x2x-privacy a:hover { color: var(--x2x-accent); }

.x2x-keeps {
	margin-top: 16px;
	border: 1px solid var(--x2x-line); border-radius: 12px;
	background: var(--x2x-surface);
	font-size: 14px;
}
.x2x-keeps summary { padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 15px; }
.x2x-keeps__body { padding: 0 16px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.x2x .x2x-keeps h4 { margin: 0 0 6px; font-size: 14px; }
.x2x .x2x-keeps ul { margin: 0; padding-left: 18px; color: var(--x2x-muted); }
.x2x .x2x-keeps li { margin: 2px 0; }

.x2x--locked { text-align: center; padding: 26px; border: 1px solid var(--x2x-line); border-radius: var(--x2x-radius); }
