.cardob {
	background-color: white;
	/* border: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border); */
	border-radius: var(--wa-border-radius-m);
	box-shadow: var(--wa-shadow-s);
	padding: var(--wa-space-s) var(--wa-space-m);
}
.cardob .heading {
	font-size: var(--wa-font-size-l);
	font-weight: var(--wa-font-weight-semibold);
}
.cardob .updated_at {
	font-size: var(--wa-font-size-xs);
	color: var(--wa-color-text-quiet);
	text-align: right;
	font-style: italic;
}
.clickable-affordance:hover {
	/* outline: var(--wa-focus-ring);
	outline-offset: var(--wa-focus-ring-offset); */
	cursor: pointer;
}

.card-list {
	background-color: white;
	box-shadow: var(---wa-color-surface-raised);
	/* border: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border); */
	border-radius: var(--wa-border-radius-m);
	box-shadow: var(--wa-shadow-s);
	position: relative;
}
.card-list .card {
	padding: var(--wa-space-s) var(--wa-space-m);
}
.card-list .card .body {
	display: flex;
	justify-content: space-between;
}
/* .card-list .card:not(:last-child) { */
.card-list > .card:not(:last-child),
.card-list > div:not(:last-child) {
	border-bottom: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-surface-border);
}
.card-list .card .date {
	font-size: var(--wa-font-size-xs);
	color: var(--wa-color-text-quiet);
	text-align: right;
	font-style: italic;
	margin-top: var(--wa-space-xs);
}

/* We use the anchor element for hyperlink-style cards so the browser treats them more like links  */
.card {
	display: block;

	&:not(.add-card) {
		color: initial;
		text-decoration: none;
	}
	&:hover {
		/* background-color: #f9fafa; */
		background: #f4f3f1;
		cursor: pointer;
	}
	&.selected {
		/* background: #E8E6E3; */
		/* background: #DDD9D5; */
		background: var(--main-background);
		outline: 1px solid #d6d2cd;
	}
}

/* These were a.card instead of just .card. I changed them so they work with any cards. I'm not sure if it will have flow on effects elsewhere. */
.card-list > .card:first-child { 
	border-top-left-radius: var(--wa-border-radius-m); 
	border-top-right-radius: var(--wa-border-radius-m);
}
.card-list > .card:last-child { 
	border-bottom-left-radius: var(--wa-border-radius-m); 
	border-bottom-right-radius: var(--wa-border-radius-m);
}


/* `change-list` is a type of `card-list` for showing a list of hyperlinked changes */
.card-list.change-list .card {
	display: flex;
	justify-content: space-between;
	gap: var(--wa-space-l);
	align-items: center;
}
.card-list.change-list .card.add-card {
	justify-content: center;
	font-size: var(--wa-font-size-s);
	/* font-weight: var(--wa-font-weight-semibold); */
	font-weight: var(--wa-font-weight-bold);
}
.card-list.change-list .card .updated_at {
	color: var(--wa-color-text-quiet);
	text-align: right;
	font-weight: 300;
	font-size: var(--wa-font-size-s);
}
.card-list.change-list .card .unnamed {
	color: var(--wa-color-text-quiet);
	font-style: italic;
}
.card-list.change-list .card .card-end {
	display: flex;
	align-items: center;
	gap: var(--wa-space-m);
}


/* Tile cards - they look like smallish clickable square cards */
.tile-card-list {
	display: flex;
	gap: var(--wa-space-s);
	flex-wrap: wrap;
}

a.tile-card {
	display: flex;
	flex-direction: column;
	gap: var(--wa-space-xs);
	align-items: center;
	padding: var(--wa-space-m);

	background-color: white;
	width: 14rem;
	border-radius: var(--wa-border-radius-m);
	box-shadow: var(--wa-shadow-s);

	&:not(.add-card) {
		color: initial;
		text-decoration: none;
	}
	&:hover {
		/* background-color: #f9fafa; */
		background: #DDD9D5;
	}

	& .icon {
		flex: 1;
		align-self: center;
		width: 2rem;
	}
	& .name {
		text-align: center;
		line-height: var(--wa-line-height-condensed);
	}
	& .name .unnamed {
		color: var(--wa-color-text-quiet);
		font-style: italic;
	}
	& .icon-wrapper svg {
		width: 2rem;
	}
}


/* Stickynotes */
.add-stickynote-button {
	position: absolute;
	bottom: 0px;
	right: 0px;
}
.field-with-stickynote {
	/* This is a container so the stickynote button (`.add-stickynote-button`) can be positioned in the lower right of the text area */
	position: relative;
}

.stickynotes {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--wa-space-s);
	margin-top: var(--wa-space-xs);
}

.stickynote-wrapper {
	width: 170px;
	min-height: 100px;
	font-size: var(--wa-font-size-s);
	background-color: #fce588;
	border-radius: 0px;
	line-height: 1.15rem;
	box-shadow: var(--wa-shadow-m);
}
.stickynotes .prose-editor .ProseMirror {
	border: none;
	background-color: #fce588;
	min-height: 100px; /* Same min-height as stickynotes. This means the user can click anywhere in the area that looks like it is for editing and the cursor will be placed inside. */
}

.stickynote-wrapper {
	position: relative;
}
.stickynote-wrapper wa-button {
	position: absolute;
	bottom: 0px;
	right: 0px;
	display: none;
	z-index: 5;
}
.stickynote-wrapper:hover wa-button,
.stickynote-wrapper:focus wa-button {
	display: inline-block;
}

.stickynotes textarea {
	display: none !important;
}
.stickynote-wrapper blockquote {
	border-width: var(--wa-border-width-m);
	border-color: var(--wa-color-gray-40);
	font-size: var(--wa-font-size-s);
	padding: var(--wa-space-xs);
	font-style: italic;
}


/* Input field with icon. Used as a Django widget `InputWithIconField`
 * 
 * Could use `display:inline-flex` for a non-100% field
 */
.input-with-icon {
	position: relative;
	display: flex;
	align-items: center;

	& .icon {
		position: absolute;
		left: var(--wa-space-m);
		pointer-events: none;
		display: flex;
		align-items: center;
	}
	&.has-icon-start input {
		padding-left: var(--wa-space-3xl);
	}
	&.has-icon-end input {
		padding-right: var(--wa-space-3xl);
	}
}

/* Tags - defaults to a dark grey style used for "ARCHIVED" */
.tag {
	text-transform: uppercase;
	font-size: var(--wa-font-size-s);
	background: var(--wa-color-neutral-40);
	width: fit-content;
	padding: var(--wa-space-3xs) var(--wa-space-xs);
	border-radius: 2px;
	color: white;
}

/* Some callouts have a button to take an action */
.callout-with-button {
	margin-bottom: var(--wa-space-xl);
}
.callout-with-button::part(message) {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
