:root {
	--messages-title-height: 64px;
	--messages-send-height: 36px;
	--camera-roll-width: 70vw;
	--font-color: #dae3f0;
	--main-font: Calibri, sans-serif, Verdana, Courier;
	--chats-border: #222;
	--chats-width: 30vw;
	--chats-button-height: 70px;
	--send-button-size: calc(var(--send-box-size) - 4px);
	--send-box-size:  calc(var(--messages-send-height) - 8px);
	--attachments-button-size: 46px;
	--top-button-gradient: linear-gradient(to bottom right, #bbb, #999);
	--top-hover-gradient: linear-gradient(to bottom right, #aaa, #888);
	--text-box-gradient: linear-gradient(to bottom right, #111, #222);
	--light-button-gradient: linear-gradient(to bottom right, #c8c8c8, #d9d9d9);

	--body-background: #000;
	--main-background: #111;
	--lighter-background: #222;
	--light-button-background: #444;
	--grayblue-background: #1a191b;
	--selected-background: #252525;

	--my-imessage-background: rgb(49, 100, 240);
	--my-sms-background: rgb(32, 179, 53);
	--their-text-background: rgb(58, 58, 60);
}
* {
	font-family: var(--main-font);
	color: var(--font-color);
	line-height: 1.2;
	scrollbar-width: none;
}
body, html {
	background-color: var(--body-background);
	height: calc(100vh - 20px);
}
html {
	padding: 0px;
}
.everything {
	display: grid;
	grid-template-columns: var(--chats-width) 1fr;
	grid-template-rows: 1fr;
	grid-template-areas: 'conversations messages';
	grid-column-gap: 5px;
	height: calc(100vh - 16px);
}
p, h2, a, button {
	font-family: var(--main-font);
	text-decoration: none;
}
:focus {
	outline: none !important;
}
::-webkit-scrollbar {
	display: none;
}
.messages {
	border: 1px solid var(--chats-border);
	grid-area: messages;
	display: grid;
	grid-template-rows: var(--messages-title-height) auto min-content;
	grid-template-columns: 1fr;
	width: 100%;
	max-height: 100%;
	background-color: var(--main-background);
	overflow-x: hidden;
	border-radius: 5px;
}
.messages .title {
	grid-row: 1;
	grid-column: 1;
	z-index: 3;
	background-color: var(--grayblue-background);
	border-bottom: 1px solid var(--light-button-background);
	display: flex;
}
.messages > .title > i {
	font-size: calc(var(--messages-title-height) * 0.5);
	margin: auto 10px;
}
.title-content {
	display: grid;
	margin: auto;
	width: max-content;
	grid-gap: 10px;
	white-space: nowrap;
	max-width: calc(100vw - var(--chats-width) - 110px);
}
.textbox {
	display: grid;
	grid-template-columns: calc(var(--attachments-button-size) + 10px) calc(var(--attachments-button-size) + 10px) 1fr var(--send-button-size);
	grid-template-rows: 1fr;
	padding: 5px 5px;
	max-width: 100%;
	resize: vertical;
	margin: 0;
	word-break: break-word;
}
@supports (backdrop-filter: blur(50px)) or (-webkit-backdrop-filter: blur(50px)) {
	.messages .title, .textbox,
	.compose, #cameraroll {
		backdrop-filter: blur(50px);
		-webkit-backdrop-filter: blur(50px);
		background-color: transparent !important;
	}
}
.title p {
	font-size: 30px;
	grid-column: 2;
	grid-row: 1;
	margin: auto;
	padding: 0;
	text-overflow: ellipsis;
	overflow-x: hidden;
	max-width: 100%;
}
.title img {
	max-height: calc(var(--messages-title-height) * 0.72);
	grid-column: 1;
	grid-row: 1;
	border-radius: 100%;
}
#text-content {
	grid-row: 1/3;
	grid-column: 1;
	overflow-x: hidden;
	padding: var(--messages-title-height) 11px 0 11px;
	display: flex;
	flex-direction: column;
}
#text-content::after {
	content: '';
	padding: 5px;
}
.centered {
	margin: auto;
	margin-top: 30vh;
	text-align: center;
	color: #bbb;
	font-size: 30px;
	max-width: 30vw;
	text-shadow: -4px 4px black;
}
.chats {
	border: 1px solid var(--chats-border);
	border-radius: 5px;
	overflow-x: hidden;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 60px 36px 1fr;
}
.chats-title {
	grid-column: 1;
	grid-row: 1;
	padding: 10px 0px 0px 10px;
	vertical-align: bottom;
	display: grid;
	grid-template-columns: 1fr max-content;
}
#battery.low i {
	color: red;
}
#battery.risky i {
	color: gold;
}
#battery.fullEnough i {
	color: limegreen;
}
i#chargingSymbol {
	color: yellow !important;
}
#stats {
	padding-right: 10px;
}
#wifi {
	color: dodgerblue;
}
.chats-title h1 {
	margin: auto 0;
	font-weight: 300;
}
.chats-search {
	padding: 5px 10px;
	border-top: 1px solid var(--chats-border);
	border-bottom: 1px solid var(--chats-border);
	display: grid;
	grid-template-columns: 1fr max-content max-content;
	grid-gap: 10px;
}
.chats-list {
	grid-row: 3;
	grid-column: 1;
	overflow: auto;
	overflow-x: hidden;
	max-width: var(--chats-width);
}
.chats button.unpinned,
#morechatsbutton {
	border: none;
	border-top: 1px solid var(--chats-border);
	background-color: var(--main-background);
	display: flex;
	width: var(--chats-width);
	transition: all linear 0.1s;
	align-items: center;
	height: var(--chats-button-height);
	position: relative;
	padding: 6px;
}
.chats button.unpinned img {
	max-height: calc(var(--chats-button-height) * 0.74);
	max-width: calc(var(--chats-button-height) * 0.74);
	border-radius: 100%;
}
.pinRow {
	display: flex;
	padding: 6px 0;
	justify-content: center;
}
.innerRow {
	margin: auto;
}
.chats button.pinned {
	background-color: transparent;
	border: none;
	padding: 5px min(12px, 0.5vw);
	margin: 0px 0.7vw;
	border-radius: 8px;
	max-width: calc(var(--chats-width) * 0.25);
	position: relative;
}
.chats button.pinned .chat-top {
	display: grid;
}
.chats button.pinned img, .pinned .chat-image {
	height: calc(var(--chats-width) * 0.20);
	width: calc(var(--chats-width) * 0.20);
	max-height: calc(var(--chats-button-height) * 1.4);
	max-width: calc(var(--chats-button-height) * 1.4);
	border-radius: 100%;
	grid-row: 1/3;
	grid-column: 1;
	margin: 0 auto 10px auto;
}
.chats button.pinned .chat-top > span {
	grid-row: 1/3;
	grid-column: 1;
}
.chats button.pinned .chat-text {
	background-color: #7776;
	color: white;
	padding: 4px;
	backdrop-filter: blur(30px);
	border-radius: 8px;
	width: max-content;
	max-width: calc(var(--chats-width) * 0.19);
	margin: 0;
	grid-row: 1;
	grid-column: 1;
	height: max-content;
}
.chats button.pinned.unread .chat-name:before,
.unread .chat-nonpic:before {
	content: '';
	background-color: #369cff;
	position: absolute;
	border-radius: 100%;
}
.chats button.pinned.unread .chat-name:before {
	width: calc(7px + 0.3vw);
	height: calc(7px + 0.3vw);
	left: calc(1vw - 19px);
	bottom: calc(14px - 3.5%);
}
.pinned .chat-name {
	font-size: calc(8px + 0.5vw);
	margin: auto;
	padding: 0;
	max-width: 100%;
	width: max-content;
}
.chat-image {
	font-size: 24px;
	background: linear-gradient(45deg, grey, #cacacab5);
	border-radius: 100%;
	width: calc(var(--chats-button-height) * 0.74);
	height: calc(var(--chats-button-height) * 0.74);
	display: grid;
}
.chat-image-letters {
	margin: auto;
	color: white;
}
.chat-nonpic {
	padding: 8px 0 0 14px;
	width: calc(var(--chats-width) - (var(--chats-button-height) * 1.1)); /* This doesn't make any sense but it seems to work */
	height: 100%;
}
.chat-toprow {
	display: flex;
	margin-bottom: 4px;
}
.chat-name {
	font-size: 16px;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-right: auto;
	white-space: nowrap;
}
.chat-text {
	color: #ddd;
	font-size: 12px;
	overflow: hidden;
	text-align: start;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.chat-date {
	padding-right: 6px;
	min-width: max-content;
	margin: auto 0 auto 6px;
}
#morechatsbutton {
	font-size: 20px;
	display: block;
}
#morechatsbutton, #morechatsbutton * {
	color: dodgerblue;
}
.unread .chat-nonpic:before {
	height: 15px;
	width: 15px;
	top: 9px;
	left: 44px;
	box-shadow: 0 0 5px #0007;
}
.text-content p img {
	max-width: 100%;
	border-radius: 10px;
	padding-bottom: 5px;
}
.text-content p.noPadding img {
	padding: 0;
}
.text.noPadding.fullAttachment, .text-area.noPadding.fullAttachment {
	background-color: transparent;
}
.fullAttachment:before, .fullAttachment:after {
	display: none;
}
.chats p {
	transition: all linear 0.1s;
}
.chats button:hover {
	background-color: var(--lighter-background);
	transition: all linear 0.1s;
}
.chats button:hover p {
	color: rgb(78, 150, 223) !important;
	transition: all linear 0.1s;
}
.selected {
	background-color: var(--selected-background) !important;
}
.selected div {
	color: rgb(115, 170, 226);
}
.text {
	font-family: var(--main-font);
	max-width: 40vw;
	margin: 2px 0;
	font-size: 18px;
	padding: 7px 12px;
	line-height: 21px; /* Specific but that's what it is */
	text-size-adjust: none !important;
}
.text span {
	word-break: break-word;
	white-space: pre-wrap;
}
.text:before, .text:after {
	content: '';
	position: absolute;
	bottom: -2px;
	height: 16px;
}
.text .subject {
	font-weight: 600;
}
.is_from_them a, .is_from_them a p, .is_from_them a span {
	color: dodgerblue;
}
.is_from_me a, .is_from_me a p, .is_from_me a span {
	color: lightblue;
}
.sender {
	font-size: 14px;
	margin: 10px 0 0 5px;;
	color: #bbb;
}
.is_from_me {
	position: relative;
	border-radius: 20px 20px 15px 20px;
	align-self: flex-end;
}
.is_from_me:before {
	right: -11px;
	border-bottom-left-radius: 16px 14px;
	transform: translate(0, -2px);
	border-bottom-right-radius: 12px;
}
.is_from_me:after {
	right: -42px;
	border-bottom-left-radius: 8px;
}
.iMessage.is_from_me:before {
	border-right: 19px solid var(--my-imessage-background);
}
.SMS.is_from_me:before {
	border-right: 19px solid var(--my-sms-background);
}
.is_from_them {
	border-radius: 20px 20px 20px 15px;
	align-self: flex-start;
	background-color: var(--their-text-background);
	position: relative;
}
.is_from_them:before {
	left: -11px;
	border-left: 20px solid var(--their-text-background);
	border-bottom-right-radius: 16px 14px;
	transform: translate(0, -2px);
	border-bottom-left-radius: 8px;
}
.is_from_them:after {
	left: 18px;
	border-bottom-right-radius: 8px;
}
.text:after {
	width: 12px;
	background: var(--main-background);
	transform: translate(-30px, -2px);
}
[class*="from_them"] + [class*="from_me"],
[class*="from_me"] + [class*="from_them"] {
	margin-top: 10px;
}
.is_from_me.iMessage {
	background-color: var(--my-imessage-background);
}
.is_from_me.SMS {
	background-color: var(--my-sms-background);
}
.text video, .text-area video,
.text img, .text-area img,
.text audio, .text-area audio {
	max-width: 100%;
	border-radius: 10px;
}
.notLast:before, .notLast:after,
.allEmoji:before, .allEmoji:after {
	display: none;
}
.notLast {
	border-radius: 20px;
}
.text.allEmoji {
	background-color: transparent;
	font-size: 50px;
	padding: 0;
}
.tapback_dialog {
	padding: 9px 8px;
	border-radius: 20px;
}
.tapback_dialog:after {
	content: none;
}
.tapback_dialog:before {
	width: 12px;
	height: 12px;
	top: 34px;
	border-radius: 100%;
	border: 0 solid black !important;
}
.is_from_them.tapback_dialog:before {
	left: -4px;
	background-color: var(--their-text-background);
}
.is_from_me.tapback_dialog:before {
	right: -4px;
	background-color: var(--my-imessage-background);
}
.SMS.is_from_me.tapback_dialog:before {
	background-color: var(--my-sms-background);
}
.tapback_choice {
	margin: 0 8px;
	border-radius: 100%;
}
i.fa-thumbs-down {
	transform: scale(-1, 1);
}
.tapback_chosen * {
	color: dodgerblue;
}
.trash_text * {
	color: crimson;
}
.spacer {
	min-height: 10px;
}
.time-display {
	text-align: center;
}
#moretextsbutton {
	border: 1px solid black;
	border-radius: 8px;
	background-color: cornflowerblue;
	align-self: center;
	margin: 20px 0;
	box-shadow: 0px 0px 10px #222;
	transition: linear 0.2s;
	padding: 6px;
	font-size: 20px;
	min-height: max-content;
}
#moretextsbutton:hover {
	box-shadow: none;
	transition: linear 0.2s;
}
#sendbutton {
	grid-column: 4;
	grid-row: 1;
	width: var(--send-button-size);
	height: var(--send-button-size);
	background-color: rgb(0, 122, 255);
	outline: none;
	border: none;
	border-radius: calc(var(--send-button-size) / 2);
	padding: 5px;
	margin-left: -2px;
	z-index: 1;
	margin-top: auto;
	margin-bottom: auto;
}
#sendbox, .subjectSubject {
	outline: none;
	resize: none;
	border: none;
	background-color: var(--selected-background);
	font-size: calc(var(--send-box-size) - 8px);
	height: var(--send-box-size);
	padding: 5px calc(var(--send-button-size) + 10px) 0 10px;
	margin: 0;
	max-height: 30vh !important;
}
#sendbox.input {
	grid-column: 3/5;
	grid-row: 1;
	border-radius: calc(var(--send-box-size) / 2);
	margin: auto 0;
}
#sendbox.subjectInput {
	border-radius: 0 0 calc(var(--send-box-size) / 2) calc(var(--send-box-size) / 2);
}
.subjectSubject {
	border-radius: calc(var(--send-box-size) / 2) calc(var(--send-box-size) / 2) 0 0;
	font-weight: bold;
}
.subjectTextarea {
	display: flex;
	flex-flow: column;
	grid-column: 3/5;
	grid-row: 1;
}
#attachmentbutton {
	display: none;
}
#unhiddenbutton {
	grid-column: 2;
}
.popup, #camerarollpopup {
	display: none;
	position: fixed;
	width: 100vw;
	height: 100vh;
	z-index: 10;
	top: 0;
	left: 0;
	background-color: rgba(0, 0, 0, 0.3);
}
.compose {
	background-color: var(--main-background);
	border-radius: 10px;
	height: 46vh;
	max-width: 60vw;
	display: grid;
	grid-template-rows: 40px 40px 1fr;
	grid-template-columns: 1fr;
	margin: auto;
	margin-top: 20vh;
}
.composeTitleBoxDiv {
	background-color: rgba(100, 100, 100, 0.2);
	border-radius: 8px 8px 0px 0px;
	padding: 5px;
	display: grid;
	grid-template-columns: 14% 1fr 14%;
	grid-row: 1;
}
#composeHideButton, #camerarollHideButton {
	grid-column: 1;
	background-color: rgba(50, 50, 50, 1);
}
#composeTitleBoxTitle, #camerarollTitleBoxTitle {
	grid-column: 2;
	text-align: center;
	margin: auto 0;
}
#composeSendButton, #camerarollSelectButton {
	grid-column: 3;
	background-color: rgba(80, 110, 220, 1)
}
#composeHideButton, #composeSendButton,
#camerarollHideButton, #camerarollSelectButton {
	border: none;
	border-radius: 5px;
	transition: all linear 0.1s;
	font-size: 15px;
	margin: 0px 20px;
}
#composeHideButton:hover, #composeSendButton:hover,
#camerarollHideButton:hover, #camerarollSelectButton:hover {
	box-shadow: none;
	transition: all linear 0.1s;
}
#composeAttachmentButton {
	display: none;
}
.composeAddressBoxDiv {
	display: grid;
	grid-template-columns: 30px 1fr 10%;
	grid-gap: 10px;
	padding: 12px 8px 4px 8px;
	grid-row: 2;
}
.composeAddressToDiv {
	margin: auto 0 auto 6px;
	grid-column: 1;
}
#composeAddressBox {
	grid-column: 2;
	border: none;
	border-radius: 5px;
	background: var(--text-box-gradient);
	font-size: 16px;
	padding: 4px;
}
#composeShowingAttachmentButton {
	grid-column: 3;
	border: none;
	border-radius: 5px;
	background-color: transparent;
	box-shadow: 0px 0px 6px black;
	transition: all linear 0.1s;
}
#composeShowingAttachmentButton:hover {
	background-color: var(--lighter-background);
	transition: all linear 0.1s;
}
#composeSendBox {
	margin: 10px;
	border: none;
	border-radius: 5px;
	width: calc(100% - (2 * 10px));
	height: calc(46vh - 90px);
	resize: none;
	grid-row: 3;
	padding: 4px;
	background-color: rgba(20, 20, 20, 0.7);
	font-size: 16px
}
#composeshowbutton, #notificationbutton {
	background-color: var(--light-button-background);
	border: none;
	border-radius: 5px;
}
#composeshowbutton {
	padding: 0px 8px;
}
#searchBox {
	outline: none;
	border: none;
	background-color: var(--light-button-background);
	border-radius: 3px;
	padding-left: 6px;
}
#notificationbutton {
	width: max-content;
	padding: 0px 8px;
}
#camerarollbutton {
	grid-column: 1;
}
#camerarollbutton, #unhiddenbutton {
	grid-row: 1;
	background-color: var(--selected-background);
	border-radius: 5px;
	width: var(--attachments-button-size);
	height: var(--send-box-size);
	outline: none;
	border: none;
	margin: auto 0 !important;
}
#cameraroll {
	background-color: var(--main-background);
	max-height: 80vh;
	max-width: var(--camera-roll-width);
	margin: auto;
	margin-top: 10vh;
	border-radius: 8px;
	display: grid;
	grid-template-rows: 40px 1fr;
	grid-template-columns: 1fr;
}
#camerarollTitle {
	background-color: rgba(100, 100, 100, 0.2);
	border-radius: 8px 8px 0px 0px;
	padding: 5px;
	display: grid;
	grid-template-columns: 14% 1fr 14%;
	grid-row: 1;
}
#camerarollContent {
	overflow: auto;
	max-width: 100%;
}
.photo {
	width: calc(var(--camera-roll-width) * 0.2);
	height: calc(var(--camera-roll-width) * 0.2);
}
.photo img {
	margin: 5px;
	object-fit: cover;
	width: calc(var(--camera-roll-width) * 0.2 - 10px);
	height: calc(var(--camera-roll-width) * 0.2 - 10px);
	border-radius: 4px;
}
.photo.selected-photo img {
	filter: opacity(0.5);
	box-shadow: 0 0 6px aliceblue;
}
#morephotosbutton {
	background-color: transparent;
	border: none;
	font-size: 28px;
}
.favorite-heart {
	position: relative;
	opacity: 0.8;
	margin-left: -40px;
	padding-right: 24px;
	top: -20px;
}
.readreceipt {
	font-size: 14px;
	align-self: flex-end;
	margin-top: 3px;
}
.readreceipt, .readreceipt strong {
	color: #a6a6a6;
}
.tapback {
	top: -8px;
	position: relative;
	padding: 5px;
	height: 16px;
	z-index: 2;
	border-radius: 20px;
}
.from_them .tapback {
	left: -12px;
	background-color: rgb(70, 140, 240);
}
.from_me .tapback {
	right: -6px;
	background-color: rgb(71, 71, 80);
}
.text-area {
	display: flex;
	flex-shrink: 0;
}
.text-area.from_me {
	align-self: flex-end;
}
.text-area.from_them {
	align-self: flex-start;
}
.noPadding {
	padding: 0 !important;
}
.text.richLink, .noPadding.fullAttachment {
	max-width: 26vw;
}
.richLink > img {
	border-radius: 10px 10px 0 0 !important;
	width: 100%;
}
.richLinkUnder {
	display: flex;
	padding: 8px;
	justify-content: space-between;
	align-items: center;
}
.richLinkTitle {
	margin: 2px;
}
.richLinkSubtitle {
	padding-left: 5px;
	color: #ccc;
	font-size: 16px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow-y: hidden;
}
.richLinkNavigator {
	display: grid;
	grid-template-rows: 1fr max-content 1fr;
}
.richLinkSmall {
	display: flex;
}
.richLinkUnder.richLinkSmall img {
	height: max-content;
	width: max-content;
	padding: 0;
	margin-right: 10px;
	max-height: 32px;
	max-width: 32px;
}
.richLinkUnder.richLinkSmall .richLinkDescription {
	margin: auto 0;
}
.richLinkIcon {
	margin: 0 4%;
	max-width: 10%;
}
.dot {
	color: #888;
}
.dot.flashing {
	color: #eee;
}
