/* Ashbar PDF Handle - front-end styles. Scoped, RTL, theme-friendly. */

.ashbar-pdfh-wrap {
	direction: rtl;
	text-align: right;
	max-width: 720px;
	margin: 0 auto;
	padding: 24px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	background: #fff;
	box-sizing: border-box;
}

.ashbar-pdfh-wrap * {
	box-sizing: border-box;
}

.ashbar-pdfh-title {
	margin: 0 0 8px;
}

.ashbar-pdfh-intro {
	margin: 0 0 20px;
	color: #555;
	font-size: 0.95em;
}

/* Dropzone */

.ashbar-pdfh-dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 36px 16px;
	border: 2px dashed #b9b9b9;
	border-radius: 10px;
	background: #fafafa;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ashbar-pdfh-dropzone:hover,
.ashbar-pdfh-dropzone:focus-visible,
.ashbar-pdfh-dragover {
	border-color: #2563eb;
	background: #f0f5ff;
	outline: none;
}

.ashbar-pdfh-choose {
	font-weight: 600;
	color: #2563eb;
}

.ashbar-pdfh-drop-hint {
	color: #777;
	font-size: 0.9em;
}

.ashbar-pdfh-file-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

/* Status */

.ashbar-pdfh-status {
	min-height: 1.4em;
	margin: 12px 0;
	font-size: 0.95em;
}

.ashbar-pdfh-status-error {
	color: #b91c1c;
}

.ashbar-pdfh-status-ok {
	color: #15803d;
}

/* Panel */

.ashbar-pdfh-panel h4 {
	margin: 0 0 10px;
}

.ashbar-pdfh-levels {
	margin-bottom: 20px;
}

.ashbar-pdfh-level {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	cursor: pointer;
}

.ashbar-pdfh-prepend {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	cursor: pointer;
	font-size: 0.95em;
}

/* Preview table */

.ashbar-pdfh-table-scroll {
	max-height: 340px;
	overflow-y: auto;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
}

.ashbar-pdfh-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92em;
}

.ashbar-pdfh-table th,
.ashbar-pdfh-table td {
	padding: 8px 12px;
	text-align: right;
	border-bottom: 1px solid #eee;
}

.ashbar-pdfh-table thead th {
	position: sticky;
	top: 0;
	background: #f5f5f5;
	z-index: 1;
}

.ashbar-pdfh-table tbody tr:last-child td {
	border-bottom: none;
}

.ashbar-pdfh-cell-name {
	word-break: break-word;
}

.ashbar-pdfh-row-skipped {
	color: #999;
}

.ashbar-pdfh-row-skipped .ashbar-pdfh-cell-name {
	text-decoration: line-through;
}

/* Actions */

.ashbar-pdfh-actions {
	display: flex;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.ashbar-pdfh-button {
	padding: 10px 22px;
	border: none;
	border-radius: 8px;
	background: #2563eb;
	color: #fff;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ashbar-pdfh-button:hover:not(:disabled) {
	background: #1d4ed8;
}

.ashbar-pdfh-button:disabled {
	background: #b9c4dd;
	cursor: not-allowed;
}

.ashbar-pdfh-button-secondary {
	background: transparent;
	color: #444;
	border: 1px solid #ccc;
	font-weight: 400;
}

.ashbar-pdfh-button-secondary:hover:not(:disabled) {
	background: #f3f3f3;
}

@media (max-width: 480px) {
	.ashbar-pdfh-wrap {
		padding: 16px;
	}

	.ashbar-pdfh-table th,
	.ashbar-pdfh-table td {
		padding: 6px 8px;
	}
}
