html {
	background-color: #fff3c4;
	overflow-x: hidden;
}

body {
	background-color: #f8f2e0;
	max-width: 2200px !important;
	margin-left: auto;
	margin-right: auto;
	border-left: 1px solid #F0B239;
	border-right: 1px solid #F0B239;
	font-family: 'Chakra Petch', sans-serif;
	overflow-x: hidden;
}

.mono {
	font-family: 'Roboto Mono', monospace;
}

.panel {
	background: #F0B239;
	border: 1px solid #e1c97a;
	border-radius: 8px;
	padding: 10px;
	padding-bottom: 10px;
}

.custom-tooltip {
	position: fixed;
	/* use fixed to escape all layout bounds */
	background-color: black;
	color: #fff;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 14px;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 10000;
	display: none;
	pointer-events: none;
}

.btn-outline-primary {
	background-color: black;
	color: #F0B239;
	outline: none;
	border: none;
	border: 1px solid black !important;
}

/*
 * HEADER
 */
.top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 20px;
	background-color: #F0B239;
	border-bottom: 1px solid #e1c97a;
	height: calc(10vh);
	max-height: calc(10vh);
}

.logo {
	height: calc(10vh);
	max-height: calc(10vh);
}

#displayName {
	display: inline-block;
}

#editBtn {
	display: none;
}

#brewery-name {
	box-sizing: border-box;
	font-size: clamp(14px, 2vw, 24px);
	margin-left: auto;
	margin-right: auto;
}

/*
 * CONTENT
 */
.content-wrapper {
	height: calc(90vh);
	display: flex;
}


/*
 * CONTENT - MIDDLE
 */
.main-panel {
	flex-grow: 1;
	padding: 10px;
}

#beer-header {
	background-color: #F0B239;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid #e1c97a;
	height: 10vh;
	max-height: 10vh;

	display: flex;
	flex-direction: column;
	justify-content: center;
}

#beer-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center; /* center horizontally */
}

#beer-header h4 {
	margin: 0;
}

#beer-count {
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


#beer-glass-container {
	position: relative;
	height: calc(20vh);
	width: calc(20vh);
	margin-left: auto;
	margin-right: auto;
	cursor: pointer;
}

#beer-glass {
	height: calc(20vh);
	width: calc(20vh);
	background-image: url('../../images/beer2.png');
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	transition: transform 0.15s ease-in-out;
	transform: scale(0.95);
}

#beer-glass:hover {
	transform: scale(1.0);
}

@keyframes clickPulse {
	0% {
		transform: scale(1.0);
	}

	50% {
		transform: scale(0.9);
		background-image: url('../../images/beer2-clicked.png');
	}

	100% {
		transform: scale(1.0);
	}
}

#beer-glass.animate {
	animation: clickPulse 0.15s ease-in-out;
}

/*
 * Tabs
 */
#tabs {
	height: calc(58vh);
	max-height: calc(58vh);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}


#infoTabs * {
	color: black;
	text-transform: uppercase;
	font-weight: bold;
}

#infoTabs button {
	font-size: 25px;
	padding-bottom: 0;
	padding-top: 0;
}

.tab-content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}


.tab-pane {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	overflow-y: auto;
	min-height: 0;
	position: relative;
}

.tab-pane>div {
	margin-left: auto;
	margin-right: auto;
}

.flex-item {
	flex: 1 1 300px;
	min-width: 300px;
	max-width: 100%;
	box-sizing: border-box;
	overflow-y: auto;
	max-height: calc(58vh - 43px);
	height: calc(58vh - 43px);
	border: 1px solid #ccc !important;
	border-radius: 10px !important;
	background-color: #f8f2e0 !important;
}

#stats {
	margin: 0;
	padding: 0;
	overflow: auto;
}

/*
 * Achievements
 */

#toggleAllAchievementsBtn,
#toggleAllIngredientsBtn {
	border: none;
	background-color: transparent;
	color: black;
	outline: none;
	text-decoration: underline;
	display: inline-block;
	margin: 0px;
	padding: 0px;
	margin-left: auto;
	margin-right: auto;
	position: absolute;
	top: 10px;
	right: 15px;
}

.show-table #toggleAllAchievementsBtn,
.show-table #toggleAllIngredientsBtn {
	display: none;
}

.achievement-item,
.ingredients-item {
	border: 1px solid #d1e7dd;
	border-radius: 0.5rem;
	overflow: hidden;
	transition: all 0.3s ease;
	background-color: #f8f9fa;
}

.achievement-item.unlocked,
.ingredients-item.unlocked {
	border-color: #198754;
	background-color: #e9fbe7;
	margin-left: 0.25rem;
	margin-right: 0.25rem;
}

.achievement-item button,
.ingredients-item button {
	font-weight: bold;
	background-color: transparent;
	border: none;
	border-bottom: 1px solid #ccc;
	padding: 0.5rem 1rem;
	cursor: pointer;
	transition: background-color 0.2s;
}

.achievement-item .collapse,
.ingredients-item .collapse {
	transition: max-height 0.3s ease;
}

.achievement-item .card,
.ingredients-item .card {
	background-color: #ffffff;
	border: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	font-size: 0.9rem;
	line-height: 1.4;
}

.achievement-item button::after,
.ingredients-item button::after {
	content: '▼';
	float: right;
	transition: transform 0.3s ease;
}

.achievement-item button[aria-expanded="true"]::after,
.ingredients-item button[aria-expanded="true"]::after {
	transform: rotate(-180deg);
}

/*
 * CONTENT - LEFT
 */
.left-panel {
	width: 25%;
	padding: 10px;
	min-width: 350px;
	width: 350px;
}

.left-panel .panel {
	height: calc(88vh);
	overflow-y: auto;
}

.building,
.for-sale {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px;
	background-color: #f8f2e0;
	margin-bottom: 5px;
	border: 1px solid #ccc;
	border-radius: 6px;
	min-height: 75px;
	width: 100%;
}

.building,
.ingredient {
	background-repeat: no-repeat;
	background-position-x: left;
	background-position-y: left;
	background-size: contain;
	display: block;
	position: relative;
}

#market-tab-content .for-sale-item-info {
	margin-left: auto;
	margin-right: auto;
}

.building img {
	width: 50px;
	height: 50px;
	margin-right: 10px;
	border-radius: 4px;
}

.building-info {
	flex-grow: 1;
	text-align: left;
	margin-left: 75px;
}

.building .buy-quantity-building {
	position: absolute;
	right: 10px;
	bottom: 0px;
}

.pub {
	position: relative;
}

#quantitySelector {
	position: absolute;
	top: 5px;
	right: 15px;
}

#quantitySelector label {
	font-weight: "bold";
	padding-top: 0px;
	padding-bottom: 0px;
	height: 24px;
	width: 40px;
}
#quantitySelector .btn-check:checked + .btn {
	background-color: #F0B239;
	color: #000000;
	border-color: #000000;
}
/*
 * CONTENT - RIGHT
 */
.right-panel {
	width: 25%;
	padding: 10px;
	min-width: 350px;
	width: 350px;
}

.right-panel .panel:first-of-type {
	height: calc(43vh);
	overflow-y: auto;
	margin-bottom: calc(1vh);
}

.right-panel .panel:last-of-type {
	height: calc(44vh);
	overflow-y: auto;
}

.hide-on-big-screen {
	display: none;
}

@media (min-width: 1200px) {
	.always-show-on-big-screen {
		display: block !important;
	}

	.hide-on-big-screen {
		display: none !important;
	}
}

@media (max-width: 1200px) {

	.left-panel,
	.right-panel {
		display: none;
	}

	.hide-on-big-screen {
		display: block;
	}

	.hide-on-small-screen {
		display: none;
	}

	.custom-tooltip {
		display: none !important;
		left: 5% !important;
		width: 90%;
		margin-top: -160px;
		max-width: 405px;
		white-space: pre-wrap;
		/* Allows line breaks and wraps */
		word-wrap: break-word;
		/* Breaks long words if needed */
		overflow-wrap: break-word;
		/* Modern standard, same effect */
		min-width: 300px;
	}
}


.achievement-table,
.ingredients-table,
.achievement-collapsibles,
.ingredients-collapsibles {
	display: none;
}

.show-table .achievement-table,
.show-table .ingredients-table {
	display: block;
	width: 100%;
	font-size: 14px;
}

.show-table .achievement-collapsibles,
.show-table .ingredients-collapsibles {
	display: none;
}

.show-collapsibles .achievement-table,
.show-collapsibles .ingredients-table {
	display: none;
}

.show-collapsibles .achievement-collapsibles,
.show-collapsibles .ingredients-collapsibles {
	display: block;
	width: 100%;
}


.floating-text {
	position: absolute;
	white-space: nowrap;
	font-weight: bold;
	color: #ffd700;
	font-size: 1.2rem;
	pointer-events: none;
	animation: floatUp 3s ease-out forwards;
	text-shadow:
		-1px -1px 0 #000,
		1px -1px 0 #000,
		-1px 1px 0 #000,
		1px 1px 0 #000;
}

.big-floating-text {
	position: absolute;
	white-space: nowrap;
	font-weight: bold;
	color: #ffd700;
	font-size: 3rem;
	pointer-events: none;
	animation: floatUp 5s ease-out forwards;
	text-shadow:
		-1px -1px 0 #000,
		1px -1px 0 #000,
		-1px 1px 0 #000,
		1px 1px 0 #000;
}

@keyframes floatUp {
	0% {
		opacity: 1;
		transform: translateY(0);
	}

	100% {
		opacity: 0;
		transform: translateY(-100px);
	}
}

#settings-tab-content,
#help-tab-content {
	background-color: #f8f2e0;
	border-radius: 5px;
	padding: 10px;
}

#settings-tab-content .btn {
	text-transform: uppercase;
	font-weight: bold;
	margin-left: auto;
	margin-right: auto;
}

#settings-tab-content .btn:hover,
#settings-tab-content .btn:focus {
	background-color: #F0B239 !important;
	color: #f8f2e0 !important;
}

#version-container {
	margin-left: auto;
	margin-right: auto;
}

.switch-container {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-left: auto;
	margin-right: auto;
}

.sound-icon {
	font-size: 1.5rem;
	transition: color 0.3s;
}



body.darkmode,
body.darkmode * {
	background-color: #121212 !important;
	color: #e1e1e1 !important;
	border-color: #e1e1e1 !important;
}

body.darkmode .building,
body.darkmode #beer-count,
body.darkmode .floating-text,
body.darkmode .big-floating-text {
	background-color: transparent !important;
}

body.darkmode .form-switch input {
	background-color: darkgray !important;
}

body.darkmode .popup,
body.darkmode #global-tooltip {
	border: 1px solid white;
}





/* Dark transparent overlay */
#popupOverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.3) !important;
	border: 1px solid;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

/* Popup container */
#popupGame, #angelsSharePopup {
	background: #222 !important;
	padding: 30px;
	border-radius: 12px;
	text-align: center;
	color: white !important;
	font-family: sans-serif;
}

#popupGame *, #angelsSharePopup * {
	background: #222 !important;
	color: white !important;
}

/* Card styles */
#popupGame .card {
	display: inline-block;
	width: 100px;
	height: 150px;
	margin: 10px;
	background-color: #444;
	line-height: 150px;
	font-size: 24px;
	border-radius: 10px;
	border-color: white !important;
	cursor: pointer;
	transition: transform 0.2s;
}

#popupGame .card:hover {
	transform: scale(1.1);
}

#popupGame #skipBtn,
#popupGame #playAgainBtn {
	display: inline-block;
	padding: 10px 20px;
	margin-bottom: 15px;
	background-color: #f39c12 !important;
	color: white !important;
	font-weight: bold;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 16px;
}

#popupGame #skipBtn {
	background-color: #f39c12 !important;
}

#popupGame #playAgainBtn {
	background-color: #22e643 !important;
	margin-left: 25px;
}

#popupGame #skipBtn:hover {
	background-color: #e67e22 !important;
	transform: scale(1.05);
}

#popupGame #playAgainBtn:hover {
	background-color: #22e6437e !important;
	transform: scale(1.05);
}

#popupGame #skipBtn:active,
#popupGame #playAgainBtn:active {
	transform: scale(0.95);
}

.clickable-happy-hour {
	position: fixed;
	width: 100px;
	height: 100px;
	cursor: pointer;
	z-index: 999999;
	user-select: none;
	transition: "transform 0.1s ease";
	color: #000000;
	background-color: transparent !important;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 5rem;
		text-shadow:
		0 0 5px rgba(255, 215, 0, 0.8),
		0 0 10px rgba(255, 215, 0, 0.7),
		0 0 20px rgba(255, 215, 0, 0.6),
		0 0 40px rgba(255, 215, 0, 0.5);
}