/* lt2 popup related styles */


#lt2_hover_el {
	position: absolute;
	transform: translate3d(0,0,0);
	z-index: var(--lt-popup-zindex, 51);
	background:#fff;
	color: #222;
	background: var(--lt-background-color);
	color: var(--lt-text-color);

	width: 550px;
	xborder: 1px solid #0002;
	box-shadow: 0 0 0 5px #ffff, 0 0 3px 6px #0000005e, 0 0 8px 6px #00000080;
	border-radius: 5px;

	left: 500px;
	top: 500px;
	display: none;

	min-height:100px;
	xheight: 190px;
	/* font-family: var(--lt-ui); */
}
#lt2_hover_el.profile_hover {
	width: 530px;
}
#lt2_hover_el.image_hover {
	width: unset;
	max-height: 90vh;
}



.popup_image_img {
	background: var(--lt-tint-dark-3);
	border: var(--lt-border);
	border-radius: var(--lt-border-radius-covers);
	max-width: 180px;
	max-height: 250px;
}
.popup_image_img.loading {
	width: 80px;
	height: 120px;
}
/* if there's a lightbox on the page then it uses a ridiculous zindex, set the hover to be one more */
#LT_LB2020 + #lt2_hover_el {
	xz-index: calc(var(--lt-lightbox-zindex) + 1);
}

.popup_content {
	display:grid;
	grid-template-columns: min-content 1fr;
	grid-template-areas: "cover_area info_area";
	padding: calc(var(--lt-padding-half) + var(--lt-padding-quarter));
	gap: var(--lt-padding);
}
.popup_cover {
	grid-area: cover_area;
}

.popup_info,
.popup_bookinfo {
	grid-area: info_area;
}
.popup_info {
	display:flex;
	flex-direction: column;
	gap: var(--lt-padding-half);
}
.popup_cover {
	min-height:100px;
	text-align: center;
	xmin-width: 120px;
}
.popup_cover img {
	max-width: 240px;
	border: 1px solid var(--lt-border-color);
	background:#0001;
	border-radius: 4px;
	min-height: 150px;
	object-fit: cover;
	max-height: 250px;
	height: 150px;
}
.nosummary .popup_cover img {

}
.popup_booktitle {
	font-size: 1.15em;
	font-weight: 700;
	xmax-height: 2.3em;
	line-height: 1.1em;
	margin-bottom: 0.1em;
	margin-top: 0;
}
.popup_author {
	font-weight: 500;
	overflow: hidden;
	max-height: 1.3em;
	line-height: 1.4em;
	xfont-size: 0.95em;
}
.popup_series {
	color: var(--lt-text-grey-color);
	margin-top: var(--lt-padding-quarter);
	font-size: 0.85em;
}
.popup_series_num {
	font-weight: normal;
}
.popup_content .summary {
	line-height: 1.3em;
	margin-top: var(--lt-padding-half);
	overflow: hidden;
	max-height: 10.9em;
}
.popup_content.popup_content_talpa .summary {
	min-height: 3em;
	max-height: 80vh;
}

.popup_actions {
	margin:10px 0 0;
	display:flex;
	justify-content: space-between;
}
.popup_actions > button,
.popup_actions > a {
	flex:0 1 auto;
	margin:5px 10px 0 0;
}
.popup_actions > a {
	xmargin-right:40px;
}
.popup_actions > button:last-child {
	margin-right:0;
}
.popup_infobar {
	display:flex;
	margin: var(--lt-padding-half) 0 0;
	font-size: 0.8em;
	justify-content: space-between;
	border-radius: 0;
	gap: var(--lt-padding-quarter);
	flex-wrap: wrap;
	row-gap: 0;

	/* to match full-size scoreboards */
	border: 1px solid var(--lt-sidebar-separator);
	padding: var(--lt-padding-quarter) var(--lt-padding-half);
	background: var(--lt-sidebar-tan);
	border-radius: var(--lt-border-radius);
}
.popup_infobar > * {
	white-space: nowrap;
	xpadding-right: var(--lt-padding-half);
	xpadding-bottom: var(--lt-padding-quarter);
	xflex: 1 1 auto;
	flex: 0 1 auto;
	text-align: center;
}
.popup_infobar.no_flex {
	justify-content: flex-start;
}
.popup_infobar > span {
	flex:0 1 auto;
}
.popup_infobar.no_flex > *,
.popup_infobar.no_flex > span {
	margin-right: 30px;
}
.popup_rating_val {
	margin-top: 1px;
	vertical-align: top;
	display: inline-block;
	margin-left: 4px;
}
.popup_content .rating i:not(.empty) {
	color: var(--lt-text-color);
}
.hoverlink {
	font-weight:600;
}


/* profile popup styles */
[data-profileid] {
	cursor:pointer;
}
.profile_popup.popup_content {
	gap: var(--lt-padding);
	grid-template-columns: auto 1fr;
}
.profile_popup .popup_cover {
	min-width: unset;
}
.profile_popup .popup_cover .cover {
	width: 120px;
	object-fit: cover;
	min-height: unset;
	max-height: 180px;
	border-radius: 10px;
}
.profile_popup {
	.popup_title {
		font-size: 1.15em;
		font-weight: 700;
		line-height: 1.1em;
		margin-top: 0;
		display: flex;
		gap: 0 var(--lt-padding);
		justify-content: space-between;
	}
	.popup_title:has(.popup_subtitle) {
		display:block;
	}

	.profile_popup_generic_avatar {
		font-size: 400%;
	}

	.profile_info {
		display: flex;
		flex-direction: column;
		gap: var(--lt-padding-half);
		word-break: break-word;
	}
	.popup_cover {
		max-width: 200px;
	}
	.popup_infobar {
		margin: 0;
		xmargin-top: calc(var(--lt-padding-half-neg) + var(--lt-padding-quarter));
	}
	.popup_subtitle {
		font-size: 80%;
		margin-top: var(--lt-padding-half-neg);
	}
}
.profile_popup .popup_underimage_controls {
	display: flex;
	margin-top: var(--lt-padding-half);
	justify-content: center;
}
.profile_popup .realname_pronouns {
	font-weight:normal;
	xfont-size: 1rem;
	flex: 1;
}
.profile_popup .profile_popup_join_date {
	font-weight: normal;
	font-size: calc(1rem* 0.8);
}


/* Mini hover styles */
#lt2_hover_el.mini {
	width:400px;
}
#lt2_hover_el.mini .popup_cover img {
	width: unset;
	height: 90px;
	margin: 0;
}
#lt2_hover_el.mini .popup_bookinfo {
	width: 100%;
}
#lt2_hover_el.mini .popup_booktitle {
	font-size: 1.05em;
}
#lt2_hover_el.mini .popup_author {
	font-size: 0.9em;
}
#lt2_hover_el.mini .popup_infobar,
#lt2_hover_el.mini .popup_content .summary {
	display: none;
}
#lt2_hover_el.mini .popup_actions {
	margin-top: 0;
}

.popup_edit {
	position: absolute;
	right: 0;
	bottom: 0;
}


/* THE TRIANGLE
------------------------------------------------------------------------------------------------------------------------------- */
#lt2_hover_el_close {
	display:block;
	position: absolute;
	right: 0;
	top: 0;
	font-size: 0.875rem;
	color: #a2a2a2;
	padding: 5px 10px 16px 17px;
}

/* for ie */
#lt2_hover_el #lt2_hover_triangle {
	border-color: #d3d3d3 transparent;
}
#lt2_hover_el #lt2_hover_triangle {
	margin-left: 30px;
	border-color: #0000005e rgba(0, 0, 0, 0);
	border-style: solid;
	border-width: 0 18px 18px;
	bottom: auto;
	position: absolute;
	top: -23px;
}
#lt2_hover_el #lt2_hover_triangle:before {
	border-color: #aaa transparent;
}

#lt2_hover_el #lt2_hover_triangle:before {
	content:"";
	position:absolute;
	border-style:solid;
	border-color: rgba(255, 255, 255, 0.85) rgba(0, 0, 0, 0);
	/* reduce the damage in FF3.0 */
	display:block;
	width:0;

	border-width: 0 20px 20px;
	bottom: auto;
	margin-left: -20px;
	top: -7px;
	z-index: -1;
	border:none;
}
#lt2_hover_el #lt2_hover_triangle:after {
	xborder-color:#fff tr
}
#lt2_hover_el #lt2_hover_triangle:after {
	content:"";
	position:absolute;
	border-style:solid;
	border-color:#fff transparent;
	/* reduce the damage in FF3.0 */
	display:block;
	width:0;

	border-width: 0 18px 18px;
	bottom: auto;
	left: -18px;
	top: 2px;
}

/* For the triangle on the bottom */
#lt2_hover_el.above #lt2_hover_triangle {
	margin-left: 30px;
	border-style: solid;
	border-width: 18px 18px 0;
	top: auto;
	position: absolute;
	bottom: -23px;
}

#lt2_hover_el.above #lt2_hover_triangle:before {

	border-width: 20px 20px 0 !important;
	top: auto;
	margin-left: -20px;
	bottom: -6px;
	z-index: -1;
}
#lt2_hover_el.ie #lt2_hover_triangle:before {
	display:none;
}
#lt2_hover_el.above #lt2_hover_triangle:after {

	border-width: 18px 18px 0 !important;
	top: auto;
	left: -18px;
	bottom: 2px;
}
#lt2_hover_el.notriangle #lt2_hover_triangle {
	display:none;
}
#lt2_hover_el.maxbox {
	top: var(--lt-padding) !important;
	right: var(--lt-padding) !important;
}







/* Stuff that I want to move to the main.css file when we can start loading it on the main pages */

.popup_content .lt2_cover {
	-webkit-backface-visibility: hidden;
	-webkit-perspective: 300;
	-webkit-transform: translate3d(0, 0, 0);
	object-fit: contain;
	max-width: 240px;
}
.popup_content .lt2_cover.lt2_loading {
	opacity:0;
	-webkit-transform: scale(0);
	-moz-transform: scale(0);
	transform: scale(0);
	min-width:110px;
	position:relative;

	transform: scale(1) translate(100px) rotateY(70deg);
	transform-origin: 0% 50%;
}
.popup_content .lt2_cover.lt2_loaded {
	opacity: 1;
	-webkit-transform: scale(1);
	-moz-transform: scale(1);
	transform: scale(1);

	-webkit-transition: opacity 150ms, transform 00ms ease-out;
	-moz-transition: opacity 150ms, transform 0ms ease-out;
	-ms-transition: opacity 150ms, transform 0ms ease-out;
	transition: opacity 150ms, transform 0ms ease-out;
	min-width:0;

	xbox-shadow: 1px 0px 0 0.5px #999,
	2px 1px 0 0.5px #fff,
	3px 1.5px 0 0.5px #888,
	4px 2px 0 0.5px #fff,
	5px 2.5px 0 0.5px #777,
	6px 3px 0 0.5px #fff,
	7px 3.5px 0 0.5px #aaa,
	8px 4px 0 0.5px #fff,
	9px 4.5px 0 0.5px #666;

	-webkit-animation: bookflip 0ms ease;

	height: unset;
	width:unset;
	background: none;
}
@-webkit-keyframes bookflip {
	0% {
		-webkit-transform: perspective(900) translate3d(0px, 0px, 0px) rotateY(-90deg);
		-webkit-transform-origin: 0% 50%;
	}
	100% {
		-webkit-transform: perspective(500) translate3d(0px,0px,0px) rotateY(0deg);
		-webkit-transform-origin: 100% 50%;
	}
}
.popup_content .lt2_cover.lt2_loaded.transition_0s {
	transition-duration: 0ms;
}
.popup_content .lt2_cover.lt2_loading::before {
	background: transparent;
	content: " ";
	display: block;
	height: 100%;
	margin-bottom: -20px;
	margin-top: -20px;
	min-height: 120px;
	min-width: 100px;
	position: relative;
	width: 100%;
}

/* Handling for popup in lightbox */
#lt2_hover_el.target_in_lightbox {
	z-index: 99999999;
}

/* Handling for legacy styling */
.legacy .popup_content .summary {
	font-size: 0.7em;
	margin-top:10px;
	line-height: 1.3em;
	height: 5.1em;
	overflow: hidden;
}
.legacy .popup_infobar {
	margin-top:10px;
}
.legacy .popup_booktitle {
	font-size: 1em;
	line-height: 1.2em;
}
.legacy .popup_author {
	font-size: 0.9em;
}


.popup_edit_container {
	padding:var(--lt-padding);
}