/* Ashbar Useful Tools - Office viewer front-end styles. Scoped, RTL, theme-friendly. */

.ashbar-ofv-wrap {
	direction: rtl;
	text-align: right;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	box-sizing: border-box;
}

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

.ashbar-ofv-fixed {
	margin: 0;
}

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

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

/* URL row */

.ashbar-ofv-url-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.95em;
}

.ashbar-ofv-url-field {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.ashbar-ofv-url-field input[type="url"] {
	flex: 1 1 260px;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 1em;
	background: #fff;
	color: #222;
}

.ashbar-ofv-url-field input[type="url"]:focus {
	border-color: #2563eb;
	outline: none;
}

/* Separator */

.ashbar-ofv-sep {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 18px 0;
}

.ashbar-ofv-sep::before,
.ashbar-ofv-sep::after {
	content: "";
	flex: 1;
	border-top: 1px solid #e6e6e6;
}

.ashbar-ofv-sep span {
	color: #888;
	font-size: 0.9em;
}

/* Dropzone */

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

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

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

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

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

.ashbar-ofv-busy .ashbar-ofv-dropzone {
	opacity: 0.6;
	pointer-events: none;
}

.ashbar-ofv-limits {
	margin: 12px 0 0;
	color: #888;
	font-size: 0.85em;
}

/* Progress */

.ashbar-ofv-progress {
	height: 6px;
	margin-top: 14px;
	border-radius: 4px;
	background: #eee;
	overflow: hidden;
}

.ashbar-ofv-progress-bar {
	width: 0;
	height: 100%;
	background: #2563eb;
	transition: width 0.15s ease;
}

/* Status */

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

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

/* Viewer - deliberately frame-free so the document gets the full post width. */

.ashbar-ofv-viewer iframe {
	display: block;
	width: 100%;
	min-height: 320px;
	border: none;
	background: #f7f7f7;
}

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

/* Buttons */

.ashbar-ofv-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-ofv-button:hover:not(:disabled) {
	background: #1d4ed8;
}

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

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

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

@media (max-width: 480px) {
	.ashbar-ofv-url-field .ashbar-ofv-button {
		width: 100%;
	}
}
