/* ================= INDEX.html ==================== */

/* Grid for exercise tiles */
.tiles-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	padding: 1rem;
}

/* Square tile style */
.tile {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-color: #444;
	color: #ffffff;
	border-radius: 12px;
	cursor: pointer;
	border: 1px solid #666;
	transition: transform 0.2s ease;
	pointer-events: auto; /* Ensure pointer-events are allowed */
}

/* Tile link styling */
.tile a {
	color: inherit;
	text-decoration: none;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: clamp(0.5rem, 4vw, 1.5rem);
	font-weight: lighter;
	overflow-x: auto;
	text-overflow: ellipsis;
}

/* Add button styled like tile */
.tile.add-button {
	background-color: #2d2d2d;
}

/* Input form */
#add-exercise-form {
	display: flex;
}

#add-exercise-form input {
	padding: 0.5rem;
	margin-bottom: 0.5rem;
	background-color: #2a2a2a;
	color: #ffffff;
	border: 1px solid #555;
	border-radius: 4px;
}

#add-exercise-form button {
	padding: 0.5rem 1rem;
	background-color: #222;
	color: #ccc;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	width:fit-content;
	font-size: clamp(0.5rem, 5vw, 1.5rem);
	border: 1px solid #444;
}

#add-exercise-form button:hover {
	background-color: #555;
}

.bottom-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	display: flex;
	justify-content: space-around;
	align-items: center;
	background-color: #f5f5f5;
	border-top: 2px solid #ccc;
	z-index: 1000;
}

.bottom-bar svg {
	width: 24px;
	height: 24px;
	fill: #2196f3;
	cursor: pointer;
	transition: fill 0.2s;
}

.load-button {
	border : none;
	width: 100%;
	height: 100%;
	padding: 0.75rem 0;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
}

.index-group-title {
	font-weight: lighter;
	font-size: clamp(0.8rem, 4vw, 1.5rem);
	color: #666;
	padding: 0.5rem 0.5rem 0.5rem 0.5rem;
	border-top: 1px solid #333;
	border-bottom: 1px solid #333;
	background-color: #222;
}

.index-group-container-main {
	display: flex;
	width: 100%;
	flex-direction: column;
	padding: 0;
	margin: 0;
}

.index-group-container, #welcome-window {
	display: flex;
	width: 100%;
	flex-direction: column;
}

.loader {
	border: 8px solid #f3f3f3;
	border-top: 8px solid #2196f3;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 1s linear infinite;
	margin: auto;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2000;
}

@keyframes spin {
	0%   { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.overlay-content-row svg {
	fill: #2196f3;
	aspect-ratio: 1 / 1;
	padding: 0.5rem 1rem 0 0;
	display: flex;
	align-items: center;
	justify-content: center;
	max-height: 48px;
}

.main-version {
	display:flex;
	justify-content: right;
	padding-right: 1rem;
	font-size: clamp(0.8rem, 4vw, 1.5rem);
	color: #666;
}