@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;700&display=swap');

body {
	font-family: 'Noto Sans JP', sans-serif;
	font-weight: 300;
}

body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url('../img/euro/ESC_artwork_large.jpg');
	background-size: cover;
	z-index: -1;
}

#scoreboard-wrapper {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 24px;
}
.scoreboard-side-img {
	width: 360px;
	object-fit: contain;
	position: sticky;
	top: 20px;
	flex-shrink: 0;
}
.scoreboard-side-img--left {
	transform: scaleX(-1);
}
.scoreboard-side-img--right {
	display: none;
}

h1, h2, h3, h4 {
	font-weight: 700;
}
h3 {
	font-size: 18px;
}
h1 span { 
    background-color: white; 
}

div.panel {
    background-color: rgba(3, 11, 39, 0.8);
    color: #fff;
    width: 80%;
    margin: auto;
    padding-left: 1em;
    padding-right: 1em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

div.panel a {
	color: #ffffff;
	text-decoration: none;
}
div.panel a:hover {
	color: #ffff66;
	text-decoration: none;
}

h1 {
	font-size: 3em;
}
.panel>h1 {
	color: #fff;
}

.panel label {
	color: #fff;
}

pre {
	background-color: #000;
	color: #e0e0e0;
}

pre#debug {
	display: none;
}

img#loading-gif, img#failure-gif {
	display: none;
}

.even div.td {
	background-color: rgba(255,255,255,0.1);
}
.odd div.td {
	background-color: rgba(0,0,0,0.1);
}

hr.small {
	width: 50%;
}

h1.center, h2.center, h3.center, h4.center {
	text-align: center;
	margin: auto;
}
div.league-table.index {
	width: 780px;
}
div.league-table.manage {
	width: 800px;
}
div.league-table {
    margin: auto;
}
div.league-table div.tr {
    margin: auto;
}
div.league-table div.th, div.league-table div.td {
	display: table-cell;
	vertical-align: middle;
}
div.league-table div.th {
	font-size: 1.5em;
	font-weight: 700;
}
#ranking-table {
}
div.rank {
	width: 48px;
	min-width: 48px;
	max-width: 48px;
	text-align: right;
	padding-right: 12px;
	font-size: 1.5em;
	font-weight: 700;
	overflow: hidden;
}
div.th.rank {
	text-align: right;
}
div.flag {
    padding-left: 32px;
    padding-right: 32px;
    width: 64px;
}
div.th.flag {
	border-left: transparent 8px solid;
}
div.td.flag {
    border-left: #fff 8px solid;
}
div.tr:hover div.td.flag {
	border-left: #3399ff 16px solid;
}
div.country {
    width: 256px;
}
div.th.country {
	text-align: left;
}
div.td.country {
    font-weight: 700;
    font-size: 1.5em;
    padding-bottom: 0.3em;
}
div.score {
    width: 64px;
    padding-left: 48px;
}
div.th.score {
	text-align: right;
}
div.td.score {
    font-weight: 700;
    font-size: 1.5em;
    padding-bottom: 0.3em;
    text-align: right;
}
div.votes {
    width: 64px;
    padding-left: 36px;
	padding-right: 24px;
}
div.th.votes {
	text-align: right;
}
div.td.votes {
    font-style: italic;
    color: #ccc;
    text-align: right;
}
div.actions {
    width: 128px;
    padding-left: 36px;
}
div.voting {
	background-color: rgba(240,32,32,0.8);
}
img.default {
	display: block;
}
img.hover {
	display: none;
}
div.tr:hover img.default, div.td.voting img.default {
	display: none;
}
div.tr:hover img.hover, div.td.voting img.hover {
	display: block;
}

#login-logout {
	background: rgba(255,255,255,0.8);
	border-radius: 8px;
	-webkit-border-radius: 8px;
	padding: 8px;
}
#login-logout a {
	text-decoration: none;
}

input[type=button], input[type=submit], input[type=reset], button {
	border-radius: 4px;
	-webkit-border-radius: 4px;
	padding: 4px;
	border: none;
	cursor: pointer;
}
input[type=button].btn-primary, input[type=submit].btn-primary, input[type=reset].btn-primary, button.btn-primary {
	background-color: #3399ff;
	color: #fff;
}
input[type=button].btn-secondary, input[type=submit].btn-secondary, input[type=reset].btn-secondary, button.btn-secondary {
	background-color: #CC6600;
	color: #fff;
}
input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover, button:hover {
	background-color: rgba(255,255,255,0.8);
	color: #333;
}

/* from base.css / style.css */
.left {
    float: left !important
}

.right {
    float: right !important
}

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table
}

.clearfix:after {
    clear: both
}

.hide {
    display: none
}

.invisible {
    visibility: hidden
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale
}

/* overrides to base styling */
#actions-sidebar {
	background: rgba(255,255,255,0.8);
}
.top-bar, .top-bar.expanded {
	background: rgba(0,0,0,0.8);
}
.top-bar.expanded .title-area {
	background: rgba(255,255,255,0.2);
}
.top-bar-section li {
	background: rgba(255,255,255,0.8) !important;
	border-radius: 8px;
	-webkit-border-radius: 8px;
	padding: 8px;
}
.top-bar-section li a {
	background: transparent !important;
	text-decoration: none;
}
table {
	border-radius: 8px;
	-webkit-border-radius: 8px;
	background: rgba(255,255,255,0.8);
	-webkit-border-radius: 8px;
}
table tr {
	border-bottom: none;
}
li#login-logout a {
	color: #000;
}

div#scratchpad {
	/*float: right;*/
	/*max-width: 200px;*/
}
div#scratchpad>div.header, div#scratchpad>div.list {
	width: 46%;
	display: inline-block;
	float: left;
}
div#scratchpad>div.central {
	width: 8%;
	display: inline-block;
	float: left;
}
div#scratchpad div.tr {
	height: 32px;
}
div#scratchpad div.tr:last-child {
	border-bottom: none;
}
div#unranked {
	background-color: rgba(255,204,0,0.5);
	border-radius: 8px 0px 0px 8px;
}
div#ranked {
	background-color: rgba(51,255,153,0.5);
	border-radius: 0px 8px 8px 0px;
}
#scratchpad img {
    width: 24px;
}
#scratchpad div.tr {
    border-bottom: #fff 1px solid;
}
#scratchpad div.td {
    font-size: 0.8rem;
    width: inherit;
    border-left: none;
    display: table-cell;
}

#nav-links {
	width: 100%;
	text-align: center;
}
#nav-links h3 {
	display: inline-block;
	padding-left: 8px;
	padding-right: 8px;
	/*width: 200px;*/
	width: 17%;
	border-right: rgba(255,255,255,0.8) 1px solid;
}
#nav-links h3:hover {
	background-color: #3399ff;
}
#nav-links h3:first-child {
	border-left: rgba(255,255,255,0.8) 1px solid;
}
.sortable {
	cursor: pointer;
}
.ui-state-highlight {
	height: 1.5em; line-height: 1.2em;
	background-color: rgba(255,255,255,0.8);
}

/* Flash messages */

div.message {
    text-align: center;
    cursor: pointer;
    display: block;
    font-weight: normal;
    padding: 0 1.5rem 0 1.5rem;
    transition: height 300ms ease-out 0s;
    background-color: #a0d3e8;
    color: #626262;
    top: 15px;
    right: 15px;
    z-index: 999;
    overflow: hidden;
    height: 50px;
    line-height: 2.5em;
}

div.message:before {
    line-height: 0px;
    font-size: 20px;
    height: 12px;
    width: 12px;
    border-radius: 15px;
    text-align: center;
    vertical-align: middle;
    display: inline-block;
    position: relative;
    left: -11px;
    background-color: #FFF;
    padding: 12px 14px 12px 10px;
    content: "i";
    color: #a0d3e8;
}

div.message.error {
    background-color: #C3232D;
    color: #FFF;
}

div.message.error:before {
    padding: 11px 16px 14px 7px;
    color: #C3232D;
    content: "x";
}
div.message.hidden {
    height: 0;
}
fieldset legend {
    color: #000;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    padding: 4px;
}

/* Welcome header */
#user-display {
	display: table-cell;
	vertical-align: middle;
}
#user-display #country-welcome {
	font-size: 2em;
	color: #fff;
}

.palace span:nth-child(2n){
    color:blue;
}
.palace span:nth-child(2n-1){
    color:red;
}

/* Previous Winners table */
table.previous-winners {
    margin: 2em auto;
    border-collapse: collapse;
    width: 60%;
    background-color: rgba(3, 11, 39, 0.95);
    color: #fff;
}
table.previous-winners th,
table.previous-winners td {
    padding: 0.7em 2em;
    text-align: left;
    font-size: 1.5em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
table.previous-winners thead th {
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}
table.previous-winners tbody tr:hover {
    background-color: rgba(51, 153, 255, 0.3);
}

#menu-toggle {
    display: none;
}

.facup-images {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
}
.facup-images img {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    div.panel {
        width: 96%;
        padding-left: 0.4em;
        padding-right: 0.4em;
    }
    #scratchpad div.td {
        font-size: 1.2rem;
    }
    #scratchpad div.td.flag {
        padding-left: 2px;
        padding-right: 4px;
    }
    #scratchpad img {
        width: 20px;
    }
    #menu-toggle {
        display: block;
        background: rgba(255,255,255,0.15);
        color: #fff;
        font-size: 1.1rem;
        padding: 6px 14px;
        border: 1px solid rgba(255,255,255,0.4);
        border-radius: 4px;
        margin-bottom: 4px;
        cursor: pointer;
    }
    #menu-toggle:hover {
        background: rgba(255,255,255,0.3);
    }
    #nav-links {
        display: none;
        width: 100%;
        text-align: left;
    }
    #nav-links.open {
        display: block;
    }
    #nav-links h3 {
        display: block;
        width: 100%;
        border-right: none;
        border-bottom: rgba(255,255,255,0.3) 1px solid;
        padding: 10px 16px;
        margin: 0;
        box-sizing: border-box;
    }
    #nav-links h3:first-child {
        border-left: none;
        border-top: rgba(255,255,255,0.3) 1px solid;
    }
    /* Scoreboard */
    .scoreboard-side-img {
        display: none;
    }
    div.league-table.index {
        width: 100%;
    }
    div.rank {
        width: 28px;
        min-width: 28px;
        max-width: 28px;
        font-size: 1em;
        padding-right: 4px;
    }
    div.flag {
        padding-left: 4px;
        padding-right: 4px;
        width: 32px;
    }
    div.td.flag {
        border-left-width: 4px;
    }
    div.tr:hover div.td.flag {
        border-left-width: 6px;
    }
    div.td.country {
        font-size: 1.1em;
    }
    div.score {
        padding-left: 8px;
        width: 44px;
    }
    div.td.score {
        font-size: 1.1em;
    }
    div.votes {
        padding-left: 4px;
        padding-right: 8px;
        width: 36px;
    }
    /* Previous Winners / Favourites tables */
    table.previous-winners {
        width: 95%;
    }
    table.previous-winners th,
    table.previous-winners td {
        padding: 0.5em 0.8em;
        font-size: 1.1em;
    }
    .facup-images {
        flex-direction: column;
        align-items: stretch;
    }
    .facup-images img {
        width: 100%;
    }
}