@import "config.css";

/* -- Global */
body {
	min-height: 100vh;
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: space-between;
	color: var(--neutral);
	background-color: var(--primary-dark);
}

.titleline{
	display: flex;
	justify-content: space-between;
}

a {
	color: hotpink;
  }
  
/* -- Components */
.container {
	width: 100%;
	margin-inline: auto;
	max-width: calc(var(--maxW) - var(--padX));
}
.text-small {
	opacity: 0.7;
	font-size: 0.875rem;
}

.text-small-white {
	font-size: 0.875rem;
	color: #ccc;
}

.text-vsmall {
	opacity: 0.7;
	font-size: 0.6875rem;
}

.no-opacity{
	opacity: 1;
}

/* -- Logo */
.logo {
	font-size: 2.5rem;
	font-weight: 700;
	font-family: "mistral", sans-serif;
	margin: min(6.5vh, 62px) 0;
}
.logo span {
	color: var(--secondary);
}

/* -- App */
.app {
	--offY: 1.6875rem;
	width: 100%;
	margin-top: calc(2.25rem + var(--offY));
	background-color: var(--primary);
}
.app .container {
	display: grid;
	justify-items: center;
	row-gap: 3.75rem;
	padding-bottom: 2.625rem;
}
.app-col:not(.game-col) {
	display: contents;
}

.app-col:not(.game-col) *[class$="box"] {
	max-width: 17rem;
}

.label {
	text-align: center;
	font-size: 1rem;
	font-weight: 800;
	color: var(--secondary);
	margin-bottom: 0.625rem;
}

/* Target */
.target-box {
	grid-row: 2;
	width: fit-content;
	margin-top: -1.125rem;
}
.target {
	font-size: 2rem;
	margin-top: -0.3125rem;
	font-family: "Oxygen", sans-serif;
}
.target-name {
	text-align: center;
}

/* Difficulty */
.dif-btn {
	font-weight: 800;
	font-size: 1.25rem;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 0.5;
	border-radius: 3px;
	transition: opacity 0.1s;
	user-select: none;
}
.dif-btn:first-of-type {
	margin-right: 1.5rem;
}
.dif-input {
	width: 0;
	height: 0;
	opacity: 0;
	position: absolute;
	z-index: -999;
}
.dif-input:checked + .dif-btn {
	opacity: 1;
}
.dif-input:not(:checked) + .dif-btn:hover {
	opacity: 0.75;
}
.dif-input:focus-visible + .dif-btn {
	outline-offset: 2px;
	outline: 1px solid var(--neutral);
}

/* Lang */ 

.lang-btn {
	font-weight: 800;
	font-size: 1.25rem;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 0.5;
	border-radius: 3px;
	transition: opacity 0.1s;
	user-select: none;
}

.lang-btn:first-of-type {
	margin-right: 1.5rem;
}

/*
.lang-input {
	width: 0;
	height: 0;
	opacity: 0;
	position: absolute;
	z-index: -999;
}
*/
.lang-input:checked + .lang-btn {
	opacity: 1;
}
.lang-input:not(:checked) + .lang-btn:hover {
	opacity: 0.75;
}

.lang-input:focus-visible + .lang-btn {
	outline-offset: 2px;
	outline: 1px solid var(--neutral);
}

/* Rules */
.rules-box .text-small {
	text-align: center;
}

/* Game */
.game-col {
	order: -1;
	max-width: 500px;
	width: 100%;
}
.game-box {
	margin-top: calc(var(--offY) * -1);
	padding: 0 1rem 1.5rem 1rem;
	background-color: var(--primary-light);
}

/* 3 */



.game-canvas {
	width: 100%;
	aspect-ratio: 1 / 1;

	background: rgba(196, 27, 27, 0.05);
	margin-top: -2.25rem;
	font-family: "Sora", sans-serif;
	font-style: normal;
	font-weight: 800;
	font-size: 32px;
	line-height: 40px;
	text-align: center;
	
}
.game-details {
	margin-top: 1rem;
	display: flex;
	justify-content: space-between;
}

.share-btn{
	background-color: #FF1493 ;
}

.TmpRules-btn{
	background-color: #FF1493 ;
}

.hint-btn {
	position: relative;
	margin-top: 0.75rem;
	z-index: 1;
	color: var(--neutral);
	width: 4.6875rem;
	height: 2.625rem;
	border-radius: 0.375rem;
	text-transform: uppercase;
	user-select: none;
	transition: opacity 0.1s;
	will-change: opacity;
}
.hint-btn:disabled {
	opacity: 0.5;
	pointer-events: none;
}
.hint-btn:disabled::before {
	opacity: 0.7;
	background-color: var(--neutral-dark);
}
.hint-btn::before,
.hint-btn::after {
	content: "";
	position: absolute;
	border-radius: 0.375rem;
	inset: 0;
	transition: opacity 0.1s;
}
.hint-btn::before {
	z-index: -2;
	background-color: var(--info);
	opacity: 0.3;
}
.hint-btn::after {
	z-index: -1;
	border: 2px solid var(--neutral);
	opacity: 0.5;
}
.hint-btn:hover::before,
.hint-btn:active::before {
	opacity: 0.4;
}
.hint-btn:hover::after,
.hint-btn:active::after {
	opacity: 0.7;
}
.hint-btn:active {
	opacity: 0.75;
}
.hint-infos {
	display: block;
	opacity: 0.75;
	font-size: 0.6875rem;
	margin-top: 0.5rem;
}

.stats-infos {
	font-size: 0.6875rem;
}

.score-box,
.score-box .label {
	text-align: right;
}

.score {
	font-size: 2.5rem;
	font-family: "Oxygen", sans-serif;
}

/* Submit */
.submit-box {
	grid-row: 3;
}
.submit-form {
	height: 3rem;
	position: relative;
	z-index: 1;
	display: flex;
}
.submit-form::before,
.submit-form::after {
	content: "";
	position: absolute;
	z-index: 1;
	user-select: none;
	pointer-events: none;
	opacity: 0.5;
	transition: opacity 0.1s;
}
.submit-form::before {
	right: calc(3rem - 2px);
	top: 50%;
	transform: translateY(-50%);
	height: calc(100% - 4px);
	border-left: 2px solid var(--neutral);
}
.submit-form::after {
	inset: 0;
	border-radius: 0.375rem;
	border: 2px solid var(--neutral);
}
.submit-form:focus-within:before,
.submit-form:focus-within:after {
	opacity: 0.75;
}
.submit-form .input-box {
	position: relative;
	z-index: 1;
}
.submit-form .input-box::before {
	content: "";
	position: absolute;
	z-index: -2;
	inset: 0;
	background-color: var(--neutral);
	opacity: 0.1;
	border-radius: 0.375rem 0 0 0.375rem;
	transition: opacity 0.1s;
}
.submit-form .input-box:hover::before,
.submit-form .input-box:focus-within::before {
	opacity: 0.15;
}
.submit-form input {
	width: 100%;
	height: 100%;
	background: none;
	color: var(--neutral);
	font-size: 1rem;
	border: 0;
	outline: 0;
	padding: 0 1.5rem;
	text-overflow: ellipsis;
	border-radius: 0.375rem 0 0 0.375rem;
}
.submit-form input::placeholder {
	color: inherit;
	opacity: 0.5;
}
.submit-form button {
	position: relative;
	display: grid;
	place-items: center;
	height: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 0 0.375rem 0.375rem 0;
	will-change: opacity;
	transition: opacity 0.1s;
}

.submit-form button::before {
	content: "";
	position: absolute;
	inset: 0px;
	z-index: -2;
	background-color: var(--confirm);
	opacity: 0.3;
	border-radius: 0 0.375rem 0.375rem 0;
	transition: opacity 0.1s;
}
.submit-form button:hover::before,
.submit-form button:active::before {
	opacity: 0.4;
}
.submit-form button:active {
	opacity: 0.75;
}

/* Past grids */
.grids-box {
	grid-row: 5;
	width: 100%;
}
.past-grids .row {
	position: relative;
	user-select: none;
	width: 100%;
	color: inherit;
	text-align: left;
	z-index: 1;
	display: grid;
	grid-template-columns: 10% 45% 45%;
	transition: opacity 0.1s;
	will-change: opacity;
}

.maxheightgrid{
	overflow-y: auto;
	max-height: 300px;
}

.wof .row {
	position: relative;
	user-select: none;
	width: 100%;
	color: inherit;
	text-align: left;
	z-index: 1;
	display: grid;
	font-size: 0.6875rem;
	transition: opacity 0.1s;
	will-change: opacity;
	grid-template-columns: 10% 35% 40% 15%;
}

.past-grids .row:not(:last-child) {
	border-bottom: 2px solid var(--primary);
}
.past-grids .row::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background-color: var(--neutral);
	opacity: 0.15;
	transition: opacity 0.1s;
}
.past-grids .row:nth-child(odd)::before {
	opacity: 0.25;
}
.past-grids .row:first-child::before {
	border-radius: 0.25rem 0.25rem 0 0;
}
.past-grids .row:last-child::before {
	border-radius: 0 0 0.25rem 0.25rem;
}
.past-grids .row:hover::before,
.past-grids .row:active::before {
	opacity: 0.2;
}
.past-grids .row:nth-child(odd):hover::before,
.past-grids .row:nth-child(odd):active::before {
	opacity: 0.3;
}
.past-grids .row:active {
	opacity: 0.75;
}
.past-grids .col {
	height: 2.375rem;
	line-height: 2.375rem;
	font-size: 0.75rem;
	white-space: nowrap;
	padding: 0 0.5rem;
	overflow: hidden;
	text-overflow: ellipsis;
}
.past-grids .col:not(:last-child) {
	border-right: 2px solid var(--primary);
}
.past-grids .col:last-child {
	text-align: right;
}

/* Footer */
footer {
	font-size: 0.6875rem;
	margin: 3.875rem 0 1.75rem 0;
	
}

/* -- Responsive */
@media (max-width: 350px) or (max-height: 600px) {
	.score {
		font-size: 2.125rem;
	}
}
@media (max-height: 600px) {
	body {
		padding: 1rem 0 !important;
	}

	.app {
		margin: 4.5rem 0 2.5rem 0 !important;
	}

	.game-col {
		min-width: 340px !important;
	}

	.logo {
		font-size: 1.75rem;
	}

	footer .text-small {
		font-size: 0.75rem;
	}
}
@media (min-width: 500px) {
	.game-col {
		min-width: 380px;
		width: min(100%, 54vh);
	}
	.game-box {
		padding: 0 2rem 1.5rem 2rem;
		border-radius: 1rem;
	}
}
@media (min-width: 1060px) {
	body {
		padding: 2rem 0;
	}

	footer {
		margin: 0;
	}

	.logo {
		margin: 0;
	}

	.app {
		margin: 5rem 0 3rem 0;
	}
	.app .container {
		column-gap: 1.5rem;
		grid-template-columns: auto auto auto;
		row-gap: 0;
		padding-bottom: 0;
	}
	.app .container * {
		grid-row: unset;
	}
	.app-col:first-child {
		justify-self: end;
	}
	.app-col:last-child {
		justify-self: start;
	}

	.app-col:not(.game-col) {
		display: flex;
		row-gap: 0;
		flex-direction: column;
		justify-content: space-evenly;
	}

	.label {
		text-align: left;
	}

	.target-box {
		margin-top: 0;
	}
	.target-name {
		text-align: right;
	}

	.rules-box .text-small {
		text-align: left;
	}

	.game-col {
		order: unset;
	}
	.game-box {
		padding-bottom: 0;
		height: calc(100% + var(--offY) * 2);
	}
}
@media (min-width: 1300px) and (min-height: 800px) {
	body {
		padding: 3.125rem 0;
	}

	.logo {
		font-size: 3rem;
	}

	.app {
		margin-top: 4rem;
	}
	.app .container {
		column-gap: 0;
	}

	.app-col:not(.game-col) {
		justify-self: center;
		row-gap: 3.75rem;
		justify-content: center;
	}

	.label {
		font-size: 1.25rem;
	}

	.game-details {
		margin-top: 1.4375rem;
		margin-bottom: 1.1rem;
	}

	.score {
		font-size: 3rem;
	}
}
/*by JF*/

.btn-yesterday{	
	display: inline-block;
	outline: 0;
	border: none;
	border-radius: 4px;
	padding: 0.5rem;
	text-align: center;
	font-size: 0.6875rem;
	background-color: #3e2c4a;
	color: white;
	opacity: 0.8;
	cursor: pointer;

}

.btn-yesterday:hover{
	opacity: 1;
}

.welcome-element{
	display: flex;
}
.welcome-screen{
	margin: auto;
	border-radius: 10px;
	border: 3px dashed #3e2c4a;
}

.group-lang{
	border-width: 0px;
}

.lineUp {
  animation: 1s anim-lineUp ease-out;
}
@keyframes anim-lineUp {
  0% {
    opacity: 0;
    transform: translateY(80%);
  }
  10% {
    opacity: 0;
  }
  50% {
    opacity: 1;
    transform: translateY(0%);
  }
  100% {
    opacity: 1;
    transform: translateY(0%);
  }
}


/*ADDING POP UP*/

.FullRanking{
    display: block;
}

.fragment {
    border: 1px solid #ccc;
    color: #555;
    display: block;
    padding: 10px;
    box-sizing: border-box;
    text-decoration: none;
}

.fragment:hover {
    box-shadow: 2px 2px 5px rgba(0,0,0,.2);
}

.noshow{
	display:none;
}

#close {
	margin-left: 90%;
	text-align: center;
    padding:2px 5px;
    background:#ccc;
}

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
	visibility: hidden; /* Hidden by default. Visible on click */
	/*min-width: 200px;  Set a default minimum width */
	/*margin-left: -200px;  Divide value of min-width by 2 */
	background-color: #333; /* Black background color */
	color: #fff; /* White text color */
	text-align: center; /* Centered text */
	border-radius: 2px; /* Rounded borders */
	padding: 16px; /* Padding */
	position: fixed; /* Sit on top of the screen */
	z-index: 1; /* Add a z-index if needed */
	/*left: 50%;  Center the snackbar */
	bottom: 30px; /* 30px from the bottom */
  }
  
  #promptloadpage {
	visibility: hidden; /* Hidden by default. Visible on click */
	position: fixed; /* Sit on top of the screen */
  }

  /* Show the snackbar when clicking on a button (class added with JavaScript) */
  #snackbar.show {
	visibility: visible; /* Show the snackbar */
	/* Add animation: Take 0.5 seconds to fade in and out the snackbar.
	However, delay the fade out process for 2.5 seconds */
	-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
	animation: fadein 0.5s, fadeout 0.5s 2.5s;
  }
  
  /* Animations to fade the snackbar in and out */
  @-webkit-keyframes fadein {
	from {bottom: 0; opacity: 0;}
	to {bottom: 30px; opacity: 1;}
  }
  
  @keyframes fadein {
	from {bottom: 0; opacity: 0;}
	to {bottom: 30px; opacity: 1;}
  }
  
  @-webkit-keyframes fadeout {
	from {bottom: 30px; opacity: 1;}
	to {bottom: 0; opacity: 0;}
  }
  
  @keyframes fadeout {
	from {bottom: 30px; opacity: 1;}
	to {bottom: 0; opacity: 0;}
  }

  
  /*TOP TABLE SCROLL*/

  .scrollable{
	overflow-y: scroll;
	height: 150px;
  }

  