/*
 * Licensed 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 CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * The modal dialog example, in Wicket, React and Svelte: the team in a table, and the form of a
 * member in the dialog.
 */
.team-demo {
	max-width: 56em;
}

.team-demo__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin-bottom: 0.75em;
}

.team-demo__title {
	margin: 0;
	font-size: 1.15em;
}

/* the table scrolls sideways in its own box on a phone, the page not */
.team-demo__scroll {
	overflow-x: auto;
}

.team-demo__table {
	width: 100%;
	border-collapse: collapse;
	background: var(--antilia-theme-surface, Canvas);
}

.team-demo__table th,
.team-demo__table td {
	padding: 0.5em 0.75em;
	border-bottom: 1px solid var(--antilia-theme-border, #ddd);
	text-align: start;
}

.team-demo__table th {
	border-bottom-width: 2px;
}

.team-demo__name {
	font-weight: 600;
}

.team-demo__actions {
	display: flex;
	gap: 0.5em;
	white-space: nowrap;
}

.team-demo__empty {
	padding: 1em;
	opacity: 0.8;
}

.member-form {
	display: grid;
	gap: 0.75em;
	min-width: min(26em, 80vw);
}

.member-form label {
	display: grid;
	gap: 0.3em;
	font-weight: 600;
}

.member-form input {
	padding: 0.45em 0.6em;
	border: 1px solid var(--antilia-theme-border, #bbb);
	border-radius: 0.3em;
	background: var(--antilia-theme-surface, Field);
	color: var(--antilia-theme-text, FieldText);
	font: inherit;
	font-weight: normal;
}

.member-form [aria-invalid="true"] {
	border-color: var(--antilia-theme-accent, #c2410c);
}

/* the options of a dialog: what closes it, dragging and folding, its size; and dialogs in it */
.dialog-options {
	margin-top: 2em;
	max-width: 56em;
}

.dialog-options__groups {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	margin: 0.75em 0 1em;
}

.dialog-options fieldset {
	display: grid;
	flex: 1 1 16em;
	align-content: start;
	gap: 0.4em;
	margin: 0;
	padding: 0.6em 0.9em 0.8em;
	border: 1px solid var(--antilia-theme-border, #ddd);
	border-radius: 0.4em;
}

.dialog-options legend {
	padding: 0 0.3em;
	font-weight: 600;
}

.dialog-options label {
	display: flex;
	align-items: center;
	gap: 0.45em;
}

.dialog-options__sizes {
	display: grid;
	gap: 0.4em;
}

.dialog-options__width {
	margin-top: 0.4em;
}

.dialog-options__width input {
	padding: 0.3em 0.5em;
	border: 1px solid var(--antilia-theme-border, #bbb);
	border-radius: 0.3em;
	background: var(--antilia-theme-surface, Field);
	color: var(--antilia-theme-text, FieldText);
	font: inherit;
}

.dialog-options__text {
	margin: 0;
	max-width: 40em;
}
