src/static/scripts/components/feed/feedInfo/_feedInfo.scss
@use "../../../../style/vars";
@use "../../../../style/shadow";

.feedInfo {
	position: fixed;
	z-index: 3;
	top: 0;
	right: 0;
	height: 100%;
	width: min(90vw, 35rem);
	background: vars.$background-el1;
	border-left: 1px solid vars.$border-color;
	opacity: 1;
	transform: translateX(0);
	transition: all .25s ease;
	box-shadow: 0 0 8rem 4rem var(--shadow-color), 0 0 4rem 2rem var(--shadow-color), 0 0 2rem 1rem var(--shadow-color);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	padding-top: 1.5rem;

	&.remove {
		opacity: 0;
		transform: translateX(20%);
		visibility: hidden;
	}

	&.loading::after {
		content: "";
		margin: auto;
		background-image: url(/img/loading3.svg);
		background-position: center;
		background-size: contain;
		width: 10rem;
		height: 10rem;
	}

	> .refreshButton {
		position: absolute;
		z-index: 1;
		top: .75rem;
		right: .75rem;
		width: 2rem;
		height: 2rem;
		opacity: .5;
		transition: all .25s ease;
		padding: 0 !important;
		display: flex;

		&:hover {
			opacity: 1;
		}

		> img {
			width: 1rem;
			height: 1rem;
			margin: auto;
		}
	}

	> .bannerImg {
		width: 100%;
		min-height: 5rem;
		max-height: 10rem;
		object-fit: cover;
		margin-top: -1.5rem;
		--bamer-bg: transparent;
		background-color: var(--banner-bg);

		+ .headerBar {
			margin-top: -2.5rem;

			> .overviewBar {
				margin-top: 2.5rem;
			}
		}
	}

	> *:not(.bannerImg) {
		padding: 0 1.5rem;
		word-break: break-word;
		margin-bottom: .5rem;
	}

	> .headerBar {
		display: flex;

		> img {
			width: 5rem;
			height: 5rem;
			border-radius: 50%;
			margin-right: 1rem;
			filter: drop-shadow(0px 0px 10px var(--shadow-color)) drop-shadow(0px 0px 5px var(--shadow-color));
		}

		> .overviewBar {
			display: flex;
			justify-content: space-between;
			flex-wrap: wrap;
			align-items: center;
			width: 100%;
			height: 2.5rem;
			margin-top: 1.25rem;

			> *, > * > * {
				font-size: .8rem;
			}

			.subActionsWrapper {
				display: flex;
				align-items: center;

				> .subscribeButton {
					height: 1.5rem;
					margin-right: .25rem;

					&:hover {
						color: vars.$primary;
						border-color: vars.$primary;
					}
				}

				.dropDownButton {
					padding: 0;
					border: none;
					background: none;
					min-width: initial;
					min-height: initial;
					width: 1.75rem;
					height: 1.75rem;

					img {
						width: 1.75rem;
						height: 1.75rem;
					}
				}
			}
		}
	}

	> .title {
	}

	.switchableBar {
		padding: 0;

		> .switcher {
			display: flex;
			justify-content: space-between;
			align-items: center;
			width: 100%;
			height: 2.5rem;
			background: vars.$switcher-bg;
			border: 1px solid vars.$border-color;
			border-left-width: 0;
			border-right-width: 0;

			> button {
				transition: background-color .25s ease;
				flex-grow: 1;
				height: 100%;

				&.selected {
					background: vars.$switcher-bg-selected;
				}

				&:hover:not(.selected) {
					background: vars.$switcher-bg-hover;
				}

				&:active:not(.selected) {
					background: vars.$switcher-bg-active;
				}

				&:first-child {
					padding-left: 1.5rem;
				}

				&:last-child {
					padding-right: 1.5rem;
				}
			}
		}

		> .content {
			padding: 1.5rem;

			.ruleWrapper {
				margin-bottom: .5rem;
				padding-bottom: .5rem;
				position: relative;

				&::after {
					content: "";
					position: absolute;
					left: 0;
					bottom: 0;
					height: 1px;
					width: calc(100% - 0rem);
					background: vars.$divider-color;
				}

				> button {
					cursor: default;

					&.expandable {
						display: flex;
						width: 100%;
						text-align: start;
						cursor: pointer;

						&::after {
							content: "";
							background-image: url("/img/downArrow.svg");
							background-size: contain;
							width: 1.5rem;
							height: 1.5rem;
							margin-left: auto;
						}

						&.expanded {
							&::after {
								transform: rotate(180deg);
							}

							+ div {
								display: block;
							}
						}
					}
				}

				> div {
					display: none;
				}
			}
		}
	}

	.editableSub {
		display: flex;
		align-items: center;
		margin-bottom: .25rem;
		position: relative;

		&.addSub {
			margin-bottom: .75rem;
			width: max-content;
		}

		> button {
			width: 1.5rem;
			height: 1.5rem;
			background-size: contain;
			background-image: url("/img/close.svg");
			margin-right: .25rem;
			--dim: 1.85rem;

			&.addSub {
				background-image: url("/img/add.svg");
			}
		}

		> input {
			border-bottom: 1px solid vars.$border-color;
		}
	}
}

.pinnedHeader .feedInfo {
	padding-top: 5rem;
}

.showInfo {
	display: block;

	&, & > button, & > button > img {
		height: 1.25rem;
	}

	> button {
		--dim: 2rem;
	}
}

.feedInfoPage {
	position: fixed;
	top: 0;
	height: 100%;
}