/**
 * RMOU Ship Search — unified tabs + results (cmstheme blue palette).
 */

.rmou-unified-wrap {
	position: relative;
	margin-bottom: 2rem;
}

/* Loading overlay covers only forms + results, not the mode links above. */
.rmou-unified-wrap .rmou-unified-main {
	position: relative;
	min-height: 120px;
}

/* Mode tabs (Basic | Advanced | Detention) */
.rmou-unified-wrap .rmou-mode-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	padding: 0;
	position: relative;
	z-index: 20;
}

.rmou-unified-wrap a.rmou-tab-btn {
	display: inline-block;
	padding: 0.55rem 1.25rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #005a9c;
	background: #fff;
	border: 2px solid #0077b6;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.rmou-unified-wrap a.rmou-tab-btn:hover {
	background: #e0f2fe;
	color: #005a9c;
}

.rmou-unified-wrap a.rmou-tab-btn:focus-visible {
	outline: 2px solid #005a9c;
	outline-offset: 2px;
}

.rmou-unified-wrap a.rmou-tab-btn[aria-current="page"],
.rmou-unified-wrap a.rmou-tab-btn.is-active {
	background: #0077b6;
	color: #fff;
	border-color: #005a9c;
}

.rmou-unified-wrap a.rmou-tab-btn[aria-current="page"]:hover,
.rmou-unified-wrap a.rmou-tab-btn.is-active:hover {
	color: #fff;
	background: #005a9c;
	border-color: #004a80;
}

.rmou-unified-wrap .rmou-tab-panel[hidden] {
	display: none !important;
}

.rmou-unified-wrap .rmou-filters {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.5rem;
}

.rmou-unified-wrap .rmou-filters h3 {
	font-size: 1.1rem;
	color: #005a9c;
	margin: 0 0 1rem;
	font-weight: 600;
}

.rmou-unified-wrap .form-group label {
	font-weight: 600;
	color: #334155;
	font-size: 0.9rem;
}

.rmou-unified-wrap .rmou-actions {
	margin-top: 1rem;
}

.rmou-unified-wrap .rmou-actions .theme-btn {
	margin-right: 0.5rem;
}

.rmou-unified-wrap .rmou-loading {
	display: none;
	align-items: center;
	justify-content: center;
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.75);
	z-index: 5;
	border-radius: 4px;
}

.rmou-unified-wrap .rmou-loading.is-active {
	display: flex;
}

.rmou-unified-wrap .rmou-loading .rmou-spinner {
	width: 42px;
	height: 42px;
	border: 3px solid #e2e8f0;
	border-top-color: #0077b6;
	border-radius: 50%;
	animation: rmou-spin 0.8s linear infinite;
}

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

.rmou-unified-wrap .rmou-results-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
	gap: 0.5rem;
}

.rmou-unified-wrap .rmou-result-count {
	font-size: 0.95rem;
	color: #475569;
}

.rmou-unified-wrap .rmou-result-count strong {
	color: #005a9c;
}

.rmou-unified-wrap .table-responsive {
	border: 1px solid #e2e8f0;
	border-radius: 4px;
}

.rmou-unified-wrap .table thead th {
	background: #0077b6;
	color: #fff;
	border-color: #005a9c;
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
}

.rmou-unified-wrap .table tbody td {
	font-size: 0.9rem;
	vertical-align: middle;
}

.rmou-unified-wrap .rmou-empty,
.rmou-unified-wrap .rmou-error {
	padding: 1.5rem;
	text-align: center;
	color: #64748b;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 4px;
}

.rmou-unified-wrap .rmou-error {
	color: #b91c1c;
	border-color: #fecaca;
	background: #fef2f2;
}

.rmou-unified-wrap .rmou-pagination {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.rmou-unified-wrap .rmou-pagination .theme-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Detention: hide inspection-from/to when not needed */
.rmou-unified-wrap .rmou-panel-detention .rmou-field-inspection {
	display: none !important;
}

/* Arabic / RTL: mirror tab order and align pagination */
[dir="rtl"] .rmou-unified-wrap .rmou-mode-tabs {
	flex-direction: row-reverse;
}

[dir="rtl"] .rmou-unified-wrap .rmou-pagination {
	flex-direction: row-reverse;
}

[dir="rtl"] .rmou-unified-wrap .rmou-filters .row {
	direction: rtl;
}

[dir="rtl"] .rmou-unified-wrap .rmou-filters .form-group label {
	text-align: right;
}

/* Flatpickr calendar above theme chrome / mega menu */
.rmou-unified-wrap .flatpickr-calendar {
	z-index: 10050;
}
