/* General styles */
.container {
	z-index: 99;
	background: var(--accent);
	color: #ffffff;
	display: flex;
	flex-direction: row;
	padding: 0 8px;
	gap: 8px;
	align-items: center;
	position: relative;
	text-align: center;
	justify-content: space-between;
}

.container ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	height: 48px;
}

.container li {
	display: block;
}

/* Navlinks */
.navlinks {
	gap: 4px;
}

.navlinks li,
.logo {
	height: 100%;
}

.navlinks li a,
.logo a,
.logo button {
	display: flex;
	flex-direction: row;
	align-items: center;
	color: inherit;
	text-decoration: none;
	padding: 0 16px;
	height: 100%;
}

.navlinks li a:hover,
.navlinks li.active a,
.logo a:hover,
.logo button:hover,
.logo.active a,
.logo.active button {
	background: var(--accent-dark);
}

/* Editor navbar */
.editorStats {
	gap: 10px;
	flex: 1;
}

.attribution {
	color: var(--fg-muted-on-accent);
	font-size: 0.9em;
}

.saveState {
	color: var(--fg-muted-on-accent);
	text-decoration: underline;
	font-size: 0.9em;
	margin-left: 20px;
	user-select: none;
}

.saveState.error {
	animation: blinking 1s infinite step-end;
}

@keyframes blinking {
	0% {
		opacity: 1;
	}
	60% {
		opacity: 1;
	}
	80% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

/* Actions on right */
.rightActions {
	gap: 14px;
}

/* Logo */
.logo a,
.logo button {
	font-weight: bold;
	gap: 6px;
	padding: 0 10px;
}

.logo .longImg {
	transform: translateY(2px);
}

.logo .dino {
	align-self: flex-end;
}

.logo .caret :global(svg) {
	display: block;
}

.logo button {
	background: transparent;
	border: none;
	cursor: var(--cursor-interactive);
}

/* Action icon and plain links */
.actionIcon {
	display: block;
}

.plainLink {
	margin: 0 4px;
}

.actionIcon a,
.plainLink a {
	display: block;
	color: var(--fg-muted-on-accent);
}

.actionIcon a:hover,
.plainLink a:hover {
	color: inherit;
}

.actionIcon :global(svg) {
	display: block;
	height: 24px;
	width: 24px;
}

.stuckBtn:not(:disabled):hover {
	background-color: rgb(255, 66, 66);
}

.stuckForm label {
	margin: 0.5em 0;
}
.stuckForm input, .stuckForm textarea {
	margin-bottom: 0.5em;
}

.stuckForm button {
	justify-content: center;
}

/* Transparency! */
.transparent {
	background: transparent;
}

.transparent .navlinks li a:hover,
.transparent .navlinks li.active a,
.transparent .logo a:hover,
.transparent .logo button:hover {
	background: #7d7d7d42;
}

.transparent .actionIcon a:not(:hover),
.transparent .plainLink a:not(:hover) {
	display: block;
	color: var(--fg-muted);
}

/* Nav popup */
.stuckPopup {
	background: var(--accent-dark);
	color: #ffffff;
	z-index: 9;
	position: absolute;
	top: 48px;
	right: 25vw;
	padding: 8px;
	box-shadow: 0 4px 8px 0 #0000005e;
	min-width: 160px;
}

.stuckPopup form {
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
}

.stuckPopup .divider {
	height: 2px;
	background: var(--accent);
	margin: 8px 0;
}

.stuckPopup ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

/* nav theme picker */
.themePicker {
	background: white;
	color: black;
	z-index: 9;
	position: absolute;
	top: 30px;
	right: 20vw;
	padding: 8px;
	box-shadow: 0 4px 8px 0 #0000005e;
	min-width: 120px;
}

.themePicker li {
	list-style-type: none;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	text-transform: capitalize;
	text-align: start;
	margin: 2px;
	padding: 4px 8px;
}

.themePicker li:hover {
	background: var(--accent);
	color: white;
}

/* Nav popup */
.navPopup {
	background: var(--accent-dark);
	color: #ffffff;
	z-index: 9;
	position: absolute;
	top: 48px;
	left: 8px;
	padding: 8px 0;
	box-shadow: 0 4px 8px 0 #0000005e;
	min-width: 160px;
}

.playPopup {
	background: var(--accent-dark);
	color: #ffffff;
	z-index: 9;
	position: absolute;
	top: 48px;
	right: 100px;
	box-shadow: 0 4px 8px 0 #0000005e;
	min-width: 160px;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
}

.inputField {
	margin-bottom: 10px;
  }

  .inputField label {
	display: block;
	text-align: left;
	margin-bottom: 8px;
	font-weight: bold;
  }

  .inputField input,
  .inputField textarea,
  .inputField select {
	width: 100%;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #f9f9f9;
	transition: border 0.3s ease;
	margin-bottom: 8px;
  }
  
  .inputField input:focus,
  .inputField textarea:focus,
  .inputField select:focus {
	border-color: #007bff;
  }

  .dragDropArea {
	width: 100%;
	padding: 15px;
	border: 2px dashed #ccc;
	border-radius: 4px;
	background-color: #f9f9f9;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.3s ease;
	margin-bottom: 10px;
  }

.checkboxField {
	display: flex;
	align-items: flex-start;
	margin-bottom: 10px;
  }
  
  .checkboxField input {
	margin-right: 10px;
  }
  
  .buttonGroup {
	display: flex;
	justify-content: flex-end;
  }
  .dragDropArea:hover {
	background-color: #e9e9e9;
  }

.fileInput {
	display: none;
}

.thumbnailPreview {
	margin-top: 10px;
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  }

.publishPopup {
	background: var(--accent-dark);
	color: #ffffff;
	z-index: 9;
	position: absolute;
	top: 48px;
	right: 100px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	min-width: 320px;
	max-width: 500px;
	border-radius: 8px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
  }

  .publishPopup h2 {
	margin: 0;
	font-size: 18px;
	font-weight: bold;
	color: #00bc8c;
	text-align: center;
  }

  .publishPopup .successMessage {
	font-size: 14px;
	margin-top: 5px;
	color: #8cdba4;
	text-align: center;
  }
  .error {
    border-color: red;
}

.error-message {
    color: red !important;
    font-size: 12px;
    margin-top: 16px;
}

.inputGroup {
	margin-top: 15px;
}

.buttonGroup {
	display: flex;
	justify-content: flex-end;
	margin-top: 20px;
}

.runButtonContainer {
	display: inline-flex;
	overflow: hidden;
	height: 35px;
  }

.publishButton {
	padding: 10px 15px;
	background-color: #3498db;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
  }

  .publishButton:hover {
	background-color: #2980b9;
  }

.publishPopup .playPopup .navPopup .divider {
	width: 100%;
	height: 1px;
	background: rgba(255, 255, 255, 0.2);
	margin: 16px 0;
}

.navPopup ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.navPopup a {
	color: var(--fg-muted-on-accent);
	display: block;
	padding: 8px 16px;
	user-select: none;
}

.navPopup a:hover {
	color: inherit;
}

/* responsive design */
@media (min-width: 600px) {
	.mobile {
		display: none;
	}
}

@media (max-width: 700px) {
	.logoText {
		display: none;
	}
}

@media (max-width: 600px) {
	.container {
		flex-direction: column;
		align-items: center;
		gap: 0;
		padding-top: 4px;
	}

	.desktop {
		display: none;
	}
}

@media (max-width: 420px) {
	.container {
		font-size: 0.9rem;
	}

	.navlinks li a,
	.logo a,
	.logo button {
		padding: 0 8px;
	}
}

.newPRButton {
	margin-left: 10px;
}
