.solid-wallet-access-app {
	max-width: 34rem;
	margin: 1.5rem 0;
	font-size: 1rem;
}

/* Widened by JS (renderDashboard() adds this class to the root element) for
   the records table, same convention as Solid Wallet's own dashboard. */
.solid-wallet-access-app.solid-wallet-access-wide {
	max-width: 64rem;
}

.solid-wallet-access-form h3,
.solid-wallet-access-header h3 {
	margin: 0 0 1rem;
}

.solid-wallet-access-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.solid-wallet-access-webid {
	font-family: monospace;
	font-size: 0.8rem;
	color: #555;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.solid-wallet-access-field {
	margin-bottom: 0.9rem;
	display: flex;
	flex-direction: column;
}

.solid-wallet-access-field label {
	font-weight: 600;
	margin-bottom: 0.3rem;
}

.solid-wallet-access-field input,
.solid-wallet-access-field select,
.solid-wallet-access-field textarea {
	padding: 0.5rem 0.6rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
}

.solid-wallet-access-field input[readonly] {
	background: #f4f6f7;
	color: #555;
}

.solid-wallet-access-button {
	background: #1b5e8c;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.6rem 1.1rem;
	font-size: 1rem;
	cursor: pointer;
}

.solid-wallet-access-button:disabled {
	opacity: 0.6;
	cursor: default;
}

.solid-wallet-access-button:hover:not(:disabled) {
	background: #164a70;
}

.solid-wallet-access-link-button {
	background: none;
	border: none;
	color: #1b5e8c;
	text-decoration: underline;
	cursor: pointer;
	padding: 0.4rem 0.6rem;
	font-size: 0.95rem;
}

.solid-wallet-access-link-button.is-danger {
	color: #b3261e;
}

.solid-wallet-access-form-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.5rem;
	flex-wrap: wrap;
}

.solid-wallet-access-message {
	padding: 0.6rem 0.8rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.solid-wallet-access-message.is-error {
	background: #fdecea;
	color: #b3261e;
	border: 1px solid #f4c3c0;
}

.solid-wallet-access-message.is-ok {
	background: #e8f5e9;
	color: #1b5e20;
	border: 1px solid #c3e6c5;
}

/* "Add a shared record" row on the dashboard: paste a link an owner shared, add it to the list below. */
.solid-wallet-access-open-row {
	display: flex;
	gap: 0.5rem;
}

.solid-wallet-access-open-row input {
	flex: 1;
	padding: 0.5rem 0.6rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95rem;
}

.solid-wallet-access-hint {
	margin: 0.5rem 0 1.25rem;
	font-size: 0.85rem;
	color: #666;
}

/* Raw-JSON fallback, shown instead of the known wallet-record fields when a
   fetched resource doesn't match that shape - see renderRecordScreen() in
   solid-wallet-access.js. */
.solid-wallet-access-raw-json textarea {
	width: 100%;
	min-height: 14rem;
	font-family: monospace;
	font-size: 0.85rem;
	box-sizing: border-box;
	resize: vertical;
}

/* Dashboard table: scrolls internally once there are more than ~10 rows,
   same convention as Solid Wallet's own table (see that plugin's CSS for
   the rationale) - the wrapper's max-height is sized for a header row plus
   10 body rows at this table's row height. */
.solid-wallet-access-table-wrap {
	max-height: 26.5rem;
	overflow-y: auto;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
}

.solid-wallet-access-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	table-layout: fixed;
}

.solid-wallet-access-table th,
.solid-wallet-access-table td {
	padding: 0.55rem 0.6rem;
	text-align: left;
	border-bottom: 1px solid #e2e2e2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.solid-wallet-access-table thead th {
	position: sticky;
	top: 0;
	background: #f4f6f7;
	font-weight: 600;
	z-index: 1;
}

.solid-wallet-access-table tbody tr:last-child td {
	border-bottom: none;
}

.solid-wallet-access-record-id {
	font-family: monospace;
	font-size: 0.8rem;
}

.solid-wallet-access-row-generic {
	color: #555;
	font-style: italic;
}

.solid-wallet-access-row-inaccessible {
	color: #b3261e;
}

/* Overrides the table's default cell overflow:hidden/nowrap - same
   specificity fix as Solid Wallet's own table, needed so the row's buttons
   (up to three here: View/edit, Delete, Remove) aren't clipped. */
.solid-wallet-access-table td.solid-wallet-access-row-actions {
	overflow: visible;
	white-space: normal;
	text-align: right;
}

.solid-wallet-access-row-actions .solid-wallet-access-link-button {
	padding: 0.2rem 0.4rem;
	font-size: 0.85rem;
	white-space: nowrap;
	margin-left: 0.3rem;
}

.solid-wallet-access-scroll-hint {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
	color: #666;
}
