.dialog-shadow {
	content: '';
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	background-color: #000;
	opacity: .5;
	display: none;
}

dialog {
	position: fixed;
	top: 44px;
	bottom: 44px;

	box-sizing: border-box;
	max-width: 640px;
	width: 100%;
	height: auto;
	left: 50%;
	margin-left: -300px;
	padding: 0;

	background-color: #63687d;
	border-radius: 10px;
	border: none;
	box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.5);
	overflow: hidden;

	display: none;
}

dialog#members-old {
	height: auto;
}

dialog h1, dialog h2, dialog h3, dialog figcaption {
	color: #fff;
	text-shadow: -1px -1px 0px #000000,
				 0px -1px 0px #000000,
	             1px -1px 0px #000000,
	             1px 0px 0px #000000,
	             -1px 0px 0px #000000,
	             -1px 1px 0px #000000,
	             1px 1px 0px #000000,
	             1px 2px 0px #000000,
	             -1px 2px 0px #000000,
	             -1px 3px 0px #000000,
	             0px 3px 0px #000000,
	             1px 3px 0px #000000;
}

dialog [data-role='close'] {
	display: block;
	position: absolute;
	top: 0;
	right: 0;
	width: 60px;
	height: 60px;
	overflow: hidden;
	white-space: nowrap;
	text-indent: 100%;
}

dialog [data-role='close']:before {
	content: '';
	display: block;
	position: absolute;
	left: 16px;
	top: 16px;
	right: 16px;
	bottom: 16px;
	border: 1.5px solid #000;
	border-radius: 7px;
	background: #ff2e2e;
	background: linear-gradient(to bottom, rgba(248,80,50,1) 0%, rgba(241,111,92,1) 50%, rgba(246,41,12,1) 51%, rgba(240,47,23,1) 71%, rgba(231,56,39,1) 100%);
}
dialog [data-role='close']:after {
	content: '×';
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	color: #fff;
	text-align: center;
	line-height: 58px;
	text-indent: 0;
	font-size: 26px;
	font-weight: 700;
	text-shadow: 0px -1px 0px #000000,
				 -1px -1px 0px #000000,
				 1px -1px 0px #000000,
				 1px 0px 0px #000000,
				 -1px 0px 0px #000000,
				 -1px 1px 0px #000000,
				 1px 1px 0px #000000,
				 0px 1px 0px #000000,
				 -1px 1.5px 0px #000000,
				 1px 1.5px 0px #000000,
				 0px 1.5px 0px #000000;
}

dialog .inner {
	background-color: #e3eef4;
	margin: 0 8px 8px 8px;
	border-radius: 5px;
    width: auto;
    height: auto;
	overflow-x: hidden;
	overflow-y: auto;
    top: 58px;
    bottom: 0;
    left: 0;
    right: 0;
    position: absolute;
}

body:not([data-active-dialog='none']) .dialog-shadow,
body[data-active-dialog='member-detail'] dialog#member-detail,
body[data-active-dialog='members-old'] dialog#members-old {
	display: block;
}

dialog .attribute-list {
	flex-wrap: wrap;
	display: flex;
    justify-content: space-between;
	align-items: stretch;
	margin-right: -12px;
}
dialog .attribute-list > * {
	margin: 0 12px 12px 0;
	flex-grow: 1;
    justify-content: space-between;
    width: 40%
}

dialog .attribute-list dt {
	display: block;
	font-weight: bold;
	font-size: 1.3rem;
	white-space: nowrap;
	color: #00a;
}
dialog .attribute-list dd {
	display: block;
	font-weight: bold;
	border-radius: 6px;
	padding: 6px;
	background-color: #ddd;
	line-height: 1.3em;
	box-shadow: inset 0px 1px 1px 0px rgba(0,0,0,0.4);
}

dialog [data-member-id] {
	display: none;
}

dialog [data-member-id].show {
	display: block;
}

dialog [data-member-id] > section {
	position: relative;
}
dialog [data-member-id] > section.normal {
	padding: 12px 0;
}
dialog [data-member-id] > section.normal:before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	display: block;
	background-color: #e5e8fb;
	border-top: 1px solid #f0ffff;
	height: 3px;
}

dialog [data-member-id] > section.flex {
	display: flex;
}

dialog [data-member-id] > section > * {
	margin: 0 12px;
}

dialog#member-details tr:last-child td,
dialog#member-details tr:last-child th {
	border-bottom: none;
}

dialog#members-old td {
	border: none;
	padding: 4px 14px;
}

dialog#members-old tr.member-start td {
	border-top: 1px solid #bbb;
}

dialog#members-old td.buttons {
	white-space: nowrap;
}

dialog [data-member-id] > h3 {
	text-align: center;
	padding: 1.5em .6em .6em .6em;
	margin: 0;
	border-bottom: 3px solid #d2f3fc;
    font-size: 2rem;
    background: #03468d url(images/diamond-tile.svg) center center;
    background-size: 32px;
    box-shadow: inset 0px 6px 20px 2px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}
dialog [data-member-id] > h3 > * {
	position: relative;
}
dialog [data-member-id] > h3.blacklist {
    background: #c13525;
    border-bottom: none;
}
dialog [data-member-id] > h3.no-promote {
    background: #ffbb43;
    border-bottom: none;
}

dialog [data-member-id] > h3:before {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background-color: #e3eef4;
	border-bottom: 5px solid #6f8cac;
	height: 12px;
	box-shadow: 0px 0px 22px 22px rgba(0,0,0,0.6);
}

dialog [data-member-id] > section.identity {
	background: linear-gradient(to bottom, rgba(4,27,58,1) 0%,rgba(31,101,189,1) 100%);
	padding: 22px 0;
	color: #fff;
	position: relative;
}

dialog [data-member-id] > section.identity h2 {
	margin-bottom: .3em;
}

dialog [data-member-id] > section.identity h2 small {
	display: block;
	font-size: 60%;
	color: #bcddff;
	text-shadow: none;
}

dialog [data-member-id] > section.identity .xp-level {
	display: inline-block;
	background: url(images/burst.svg) no-repeat center;
	background-size: contain;
	width: 44px;
	height: 44px;
	line-height: 44px;
	text-align: center;
	font-size: 1.8rem;
	margin-bottom: 0;
}

dialog [data-member-id] > section.identity .trophies {
	display: inline-block;
	color: #ffff64;
	background-color: rgba(0,0,0,.7);
	border-radius: 10px;
	border: 1px inset #aaa;
	line-height: 26px;
	text-align: center;
	font-size: 1.8rem;
	padding: 0 12px 0 36px;
	position: relative;
	margin-left: 22px;
	margin-bottom: 0;
}

dialog [data-member-id] > section.identity .trophies:before {
	content: '';
    display: block;
    position: absolute;
    left: -18px;
    border-left: 1px solid rgba(255,255,255,0.4);
    top: 1px;
    bottom: 1px;
}

dialog [data-member-id] > section.identity .trophies:after {
	content: '';
	display: block;
	background: url(images/crown-gold.svg) no-repeat;
	background-size: contain;
	width: 36px;
	height: 36px;
	position: absolute;
	left: -8px;
	top: 0;
}

dialog [data-member-id] > section.identity .arena-league {
	position: absolute;
	right: 0;
	top: 12px;
	bottom: 12px;
	width: 150px;
	text-align: center;
	background-position: top center;
	background-size: contain;
	background-repeat: no-repeat;
}
dialog [data-member-id] > section.identity .arena-league > figcaption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}
dialog .button {
	display: block;
	margin: 0 0 12px 0;
	font-size: 16px;
	text-align: left;
}

dialog#members-old .button {
	display: inline-block;
	margin: 0;
}
dialog#members-old .button > span {
	padding: 12px 14px;
}

dialog .button.statsroyale > span,
dialog .button.royaleapi > span {
	padding-left: 38px;
	white-space: nowrap;
}

dialog .button.statsroyale > span:before,
dialog .button.royaleapi > span:before {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	position: absolute;
	left: 12px;
	top: 50%;
	margin-top: -9px;
}

dialog#members-old .button.statsroyale > span:before,
dialog#members-old .button.royaleapi > span:before {
	left: 50%;
	margin-left: -9px;
}

dialog .button.statsroyale > span:before {
	background-image: url(https://cdn.statsroyale.com/images/favicon/apple-touch-icon-precomposed.png)
}

dialog .button.royaleapi > span:before {
	background-image: url(https://royaleapi.com/static/img/favicon/favicon-32x32.png)
}

dialog h1 {
	font-size: 3.0rem;
    line-height: 2.0em;
	color: #fff;
    padding: 0 22px;
    margin: 2px 2px 0 2px;
    text-align: center;
	background: linear-gradient(to bottom, rgba(255,255,255,0.25) 0%,rgba(241,241,241,0.25) 50%,rgba(225,225,225,0.25) 51%,rgba(255,255,255,0) 100%);
	border-radius: 10px;
}

@media (max-width: 700px) {
	dialog {
		max-width: none;
		width: auto;
	    height: auto;
        left: 12px;
        right: 12px;
        top: 12px;
        bottom: 12px;
        margin-left: 0;
    }

	dialog .inner {
		top: 44px;
	}

	dialog [data-role='close'] {
		width: 44px;
		height: 44px;
		background-size: 16px;
		top: 1px;
	}
	dialog [data-role='close']:before {
		left: 10px;
		top: 10px;
		right: 10px;
		bottom: 10px;
	}
	dialog [data-role='close']:after {
		line-height: 42px;
	}

	dialog [data-member-id] > section.flex {
		display: block;
	}

    dialog [data-member-id] > section > * {
		margin: 0 12px;
	}
	dialog h1 {
		font-size: 2.2rem;
	    line-height: 2.0em;
	}
	dialog [data-member-id] > section.identity .arena-league {
		width: 100px;
		height: 100px;
	}
}

@media (max-width: 600px) {
	dialog#members-old table {
		margin: 0;
	}

	dialog#members-old td {
		padding: 4px 8px;
	}

	dialog#members-old .button {
		display: block;
		width: 40px;
		margin-bottom: 8px;
	}
	dialog#members-old .button:last-child {
		margin-bottom: 0;
	}
}