/*
* Okay, Sounds Great!
* URI: http://www.okaysoundsgreat.com
* Author: Dennis de Groot
* Version: 1.0.0
*/

/**
 * Global
 */

@media (prefers-color-scheme: light) {
	:root {
		--page-bg: white;
		--receive-bg: #E5E5EA;
		--receive-color: black;
		--send-bg: #0B93F6;
		--send-color: white;
		--sendastext-bg: #53D769;
		--sendastext-color: white;
		--preview-bg: #E5E5EA;
		--preview-color: black;
		--preview-title: black;
		--preview-caption: #848489;
		--ui-color: #8a898e;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--page-bg: black;
		--receive-bg: #262629;
		--receive-color: white;
		--send-bg: #0B93F6;
		--send-color: white;
		--sendastext-bg: #53D769;
		--sendastext-color: white;
		--preview-bg: #262629;
		--preview-color: white;
		--preview-title: white;
		--preview-caption: #94949b;
		--ui-color: #8a898e;
	}
}

html, body {
  overflow-x: hidden;
}

body {
  position: relative
}

body {
	max-width: 90%;
	max-height: 90%;
	overflow-x: visible;
	margin: 50px auto;
	margin-top: 0;
	margin-bottom:0;
	background-color: var(--page-bg);
	font-family: "Helvetica Neue", Helvetica, sans-serif;
	font-size: 20px;
	font-weight: normal;
}

p {
	max-width: 300px;
	word-wrap: break-word;
	margin-bottom: 0px;
	margin-top:2px;
	line-height: 24px;
	position: relative;
	padding: 10px 20px;
	border-radius: 25px;
}

/* Remove default hooks from all messages */
p:before, p:after {
    content: none;
}

/* Add hooks only to messages with .last-in-group class */
p.last-in-group:before, p.last-in-group:after {
    content: "";
	position: absolute;
    bottom: 0;
    height: 25px;
}

.section {
	margin-bottom: 10px;
}

/**
 * Container
 */

.box {
	display: flex;
	flex-direction: column;
	margin-bottom:0px;
}

/* Add margin between message groups */
.send + .receive, .receive + .send, 
#mgmt + .send, #touring + .send,
.send + #mgmt, .leftcard + .send {
    margin-top: 10px;
}



/**
 * Blue bubbles
 */

.send {
	color: var(--send-color); 
	background: var(--send-bg);
	align-self: flex-end;
}

.send.last-in-group:before {
	right: -7px;
    width: 20px;
    background-color: var(--send-bg);
	border-bottom-left-radius: 16px 14px;
}

.send.last-in-group:after {
	right: -26px;
    width: 26px;
    background-color: var(--page-bg);
	border-bottom-left-radius: 10px;
}

.send a, a:hover, a:visited {
  	color: var(--sendastext-color);
}

/**
 * Green bubbles
 */

.sendastext {
	color: var(--sendastext-color); 
	background: var(--sendastext-bg);
	align-self: flex-end;
}

.sendastext.last-in-group:before {
    right: -7px;
    width: 20px;
    background-color: var(--sendastext-bg);
    border-bottom-left-radius: 16px 14px;
}

.sendastext.last-in-group:after {
    right: -26px;
    width: 26px;
    background-color: var(--page-bg);
    border-bottom-left-radius: 10px;
}

/**
 * Gray bubbles
 */

.receive {
	background: var(--receive-bg);
	align-self: flex-start;
	color: var(--receive-color); 
}

.receive.last-in-group:before {
	left: -7px;
    width: 20px;
    background-color: var(--receive-bg);
	border-bottom-right-radius: 16px 14px;
}

.receive.last-in-group:after {
	left: -26px;
    width: 26px;
    background-color: var(--page-bg);
	border-bottom-right-radius: 10px;
}

/**
 * Attachments
 */

.preview {
	background: var(--preview-bg);
	color: var(--preview-color);
	align-self: flex-start;
	width: 250px;
	padding:0;
}

.preview.last-in-group:before {
	left: -7px;
    width: 20px;
    background-color: var(--preview-bg);
	border-bottom-right-radius: 16px 14px;
}

.preview.last-in-group:after {
	left: -26px;
    width: 26px;
    background-color: var(--page-bg);
	border-bottom-right-radius: 10px;
}

.preview img {
	border-top-left-radius: 10%;
	border-top-right-radius: 10%;
	max-width:250px;
}

.previewtitle {
	padding-left:20px;
    padding-bottom:0;
	font-size: 75%;
	font-weight:500;
	width:100%;
    display:block;
    margin-bottom: -5px;
   	color: var(--preview-title);
}

.previewcaption {
	padding-left:20px;
	font-size: 60%;
    display:block;
    padding-bottom:5px;
    color: var(--preview-caption);
}

.preview a, .preview a:hover, .preview a:visited {
	text-decoration: none;
	color: inherit;
}

/**
 * Contact bubbles
 */

p.card {
	padding:15px 20px;
	border-radius: 20px;
}

.card {
	color: var(--send-color); 
	background: var(--send-bg);
	align-self: flex-end;
	font-size: 75%;
	font-weight:500;
    letter-spacing: 0.3px;
}

.card.last-in-group:before {
    right: -7px;
    width: 20px;
    background-color: var(--send-bg);
    border-bottom-left-radius: 16px 14px;
}

.card.last-in-group:after {
    right: -26px;
    width: 26px;
    background-color: var(--page-bg);
    border-bottom-left-radius: 10px;
}

.card a, .card a:hover, .card a:visited{
	color:inherit;
	text-decoration: none;
}

p.leftcard {
	padding:15px 20px;
	border-radius: 20px;
}

.leftcard {
	color: var(--receive-color); 
	background: var(--receive-bg);
	align-self: flex-start;
	font-size: 75%;
	font-weight:500;
    letter-spacing: 0.3px;
}

.leftcard.last-in-group:before {
    left: -7px;
    width: 20px;
    background-color: var(--receive-bg);
    border-bottom-right-radius: 16px 14px;
}

.leftcard.last-in-group:after {
    left: -26px;
    width: 26px;
    background-color: var(--page-bg);
    border-bottom-right-radius: 10px;
}

.leftcard a, .leftcard a:hover, .leftcard a:visited{
	color:inherit;
	text-decoration: none;
}

.icon {
	height: 25px;
	width: 25px;
	background-color: #fff;
	border-radius: 50%;
	display: inline-block;
	text-align:center;
	margin-left:10px;
	margin-right:5px;
	vertical-align: bottom;
}

.initials {
	color:#000;
	vertical-align:2px;
 	font-size:xx-small;
}

.chevron::before {
	border-style: solid;
	border-width: 0.15em 0.15em 0 0;
	content: '';
	display: inline-block;
	height: 0.45em;
	transform: rotate(-45deg);
	width: 0.45em;
}

.chevron.right:before {
	left: 0;
	transform: rotate(45deg);
}

/**
* UI
*/

.timestamp {
	color: var(--ui-color); 
	font-size: 55%;
	font-weight: 600;
	letter-spacing: 0.3px;
	margin-top:10px;
	align-self: center;
	margin-bottom:10px;
}

.readreceipt {
	color: var(--ui-color); 
	align-self: flex-end;
	font-size: 55%;
	font-weight: 600;
	padding: 7px 2px 0 0;
	letter-spacing: 0.3px;
	margin-bottom:15px;
}