/*!
 * Copyright 2024 Adobe. All rights reserved.
 *
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at <http://www.apache.org/licenses/LICENSE-2.0>
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

.spectrum-Pagination {
	--spectrum-pagination-counter-color: var(--mod-pagination-counter-color, var(--spectrum-neutral-subdued-content-color-default));
	--spectrum-pagination-counter-font-size: var(--mod-pagination-counter-font-size, var(--spectrum-font-size-100));
	--spectrum-pagination-counter-line-height: var(--mod-pagination-counter-line-height, var(--spectrum-line-height-100));
	--spectrum-pagination-counter-inline-spacing: var(--mod-pagination-page-button-inline-spacing, var(--spectrum-pagination-item-inline-spacing));

	&:dir(rtl) {
		--spectrum-logical-rotation: matrix(-1, 0, 0, 1, 0, 0);
	}
}

.spectrum-Pagination--explicit,
.spectrum-Pagination--listing {
	display: flex;
	flex-direction: row;
	align-items: center;
}

/* Explicit variant elements */
.spectrum-Pagination-textfield {
	/* @passthrough start */
	--mod-textfield-width: var(--mod-pagination-textfield-width, var(--spectrum-pagination-textfield-width));
	--mod-textfield-min-width: var(--mod-pagination-textfield-width, var(--spectrum-pagination-textfield-width));
	/* @passthrough end */
}

.spectrum-Pagination-counter {
	font-size: var(--spectrum-pagination-counter-font-size);
	line-height: var(--spectrum-pagination-counter-line-height);
	color: var(--spectrum-pagination-counter-color);
}

.spectrum-Pagination-counter,
.spectrum-Pagination-nextButton {
	margin-inline-start: var(--spectrum-pagination-counter-inline-spacing);
}

.spectrum-Pagination-prevButton {
	margin-inline-end: var(--spectrum-pagination-counter-inline-spacing);
}

/* Correct the direction of the arrows */
.spectrum-Pagination-nextButton .spectrum-Icon {
	transform: var(--spectrum-logical-rotation,);
}

.spectrum-Pagination-prevButton .spectrum-Icon {
	transform: var(--spectrum-logical-rotation,) rotate(180deg);
}
