
/*
	GoToSocial
	Copyright (C) GoToSocial Authors admin@gotosocial.org
	SPDX-License-Identifier: AGPL-3.0-or-later

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU Affero General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Affero General Public License for more details.

	You should have received a copy of the GNU Affero General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

main.directory .backnextlinks {
		margin-top: 1rem;
		display: flex;
		justify-content: space-between;
	}

main.directory .backnextlinks .next {
			margin-left: auto;
		}

main.directory > ol.directory-list {
		list-style-type: none;
		padding: 0;
		margin: 0;
		display: flex;
		flex-direction: column;
		gap: 1rem;
	}

main.directory > ol.directory-list > li.directory-list-entry > address {
			width: 100%;
			height: 100%;
			border-radius: var(--br);
			box-shadow:var(--boxshadow);
			border: var(--boxshadow-border);
			
			background: var(--list-entry-bg);
		}

main.directory > ol.directory-list > li.directory-list-entry > address:hover {
				background: var(--list-entry-alternate-bg);
			}

main.directory > ol.directory-list > li.directory-list-entry > address {

			color: inherit;
			text-decoration: none;
			font-style: normal;
}

main.directory > ol.directory-list > li.directory-list-entry > address > a {
				--avatar-size: 8.5rem;
				--name-size: 3rem;
				--username-size: 2rem;
				--overlap: calc(var(--avatar-size) - var(--name-size) - var(--username-size));
				
				color: inherit;
				text-decoration: none;
				font-style: normal;

				position: relative;
				display: grid;
				gap: 0 1rem;
				box-sizing: border-box;
				grid-template-columns: var(--avatar-size) auto 1fr;
				grid-template-rows: auto var(--name-size) auto;
				grid-template-areas:
					"header header header"
					"avatar strap  strap"
					"avatar strap  strap";
			}

main.directory > ol.directory-list > li.directory-list-entry > address > a > picture.header {
					grid-area: header;
					position: relative;
					aspect-ratio: 3;
					height: 100%;
					width: 100%;
					border-radius: var(--br) var(--br) 0 0;
				}

main.directory > ol.directory-list > li.directory-list-entry > address > a > picture.header > img {
						position: absolute;
						top: 0;
						left: 0;
						right: 0;
						width: 100%;
						height: 100%;
						object-fit: cover;
						border-radius: var(--br) var(--br) 0 0;
					}

main.directory > ol.directory-list > li.directory-list-entry > address > a > picture.avatar {
					z-index: 1;
					grid-area: avatar;
					/*
						Margin top to inset profile pic into
						header image, margin sides and bottom to inset.
					*/
					margin: calc(-1 * var(--overlap)) 1rem 1rem 1rem;
					height: var(--avatar-size);
					width: var(--avatar-size);
					object-fit: cover;
					border: 0.2rem solid var(--avatar-border);
					border-radius: var(--br);
					overflow: hidden;
				}

/* hides corners from img overflowing */

main.directory > ol.directory-list > li.directory-list-entry > address > a > picture.avatar > img {
						height: 100%;
						width: 100%;
						object-fit: cover;
						background: var(--bg);
						border-radius: var(--br-inner);
					}

main.directory > ol.directory-list > li.directory-list-entry > address > a > .strap {
					grid-area: strap;
					display: flex;
					flex-direction: column;
					margin-left: 1rem;
					font-weight: bold;
				}

main.directory > ol.directory-list > li.directory-list-entry > address > a > .strap .displayname {
						line-height: var(--name-size);
						font-size: 1.5rem;
					}

main.directory > ol.directory-list > li.directory-list-entry > address > a > .strap .username {
						color: var(--link-fg);
					}

main.directory > ol.directory-list > li.directory-list-entry > address > .note {
				margin: 0 1rem 1rem 1rem;
				max-height: 1.5rem;
  				-webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
  				mask-image: linear-gradient(to right, black 80%, transparent 100%);
			}

/*
	Tablet-ish-kinda size.
*/

@media screen and (max-width: 750px) {
	main.directory > ol.directory-list > li.directory-list-entry > address > a {
		grid-template-areas:
			"header header header"
			"avatar .      .     "
			"avatar .      .     "
			"strap  strap  strap ";
	}
		
		main.directory > ol.directory-list > li.directory-list-entry > address > a > picture.avatar {
			margin-bottom: 0;
		}

		main.directory > ol.directory-list > li.directory-list-entry > address > a > .strap {
			margin-bottom: 1rem;
		}
			
			main.directory > ol.directory-list > li.directory-list-entry > address > a > .strap > .displayname {
				font-size: 1.2rem;
				line-height: 2rem;
				margin-top: 0.82rem;
			}
}

/*
	Phone-ish-kinda size.
*/

@media screen and (max-width: 500px) {
	main.directory > ol.directory-list > li.directory-list-entry > address > a {
		--avatar-size: 5rem;
		--name-size: 1.2rem;
		--username-size: 1rem;
	}
}

