/* Center layout */
.CenteredLayout {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
	flex-wrap: wrap;
	justify-content: center;
  align-items: center;
}

.image-container {
	cursor: pointer;
	transition: transform 0.3s;
	width: 50vw; /* Initial width is 50% of the viewport width */
	height: auto; /* Maintain aspect ratio */
	max-width: 400px; /* Maximum initial width */
}

.inline-message {
  display: inline;
}

#countdown-timer {
	margin-left: 2px;
  display: inline;
  font-weight: bold;
}

.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid var(--primary-color); 
  border-radius: 50%;
  width: 80px;
  height: 80px;
  animation: spin 5s linear infinite;
  margin: 20px auto;
}

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

.downtime {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.presentation-form {
	width: 50%;
}

/* Card containing QR + buttons */
.qr-card {
  background-color: #f0f0f0;
  border-radius: 10px;
  padding: 30px;
  width: 80%;
  max-width: 800px;
  margin: 0 auto 30px auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

#qr-image {
  border: 10px solid white;
}

.qr-url-block {
	max-width: 100%;
  text-align: left;
  margin: 0 auto;
}

.qr-url {
  font-size: 14px;
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  max-width: 100%;
	word-break: break-all;
	max-height: 50px;
	overflow: auto;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.buttons button {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}


button#cancelButton {
  background-color: gray;
  color: white;
}

/* Presentation definition collapsible container */
.presentation-definition-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.details-toggle {
  width: 80%;
  max-width: 800px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f4f4f4;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.details-toggle summary {
  font-size: 19px;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
}

.details-toggle summary::before {
  content: "▸";
  font-size: 22px;
  transition: transform 0.2s ease;
}

.details-toggle[open] summary::before {
  transform: rotate(90deg);
}

.presentation-definition-block {
  width: 100%;
}

.presentation-definition {
  width: 100%;
  font-family: monospace;
  background-color: #f4f4f4;
  border: none;
  padding: 0;
  resize: vertical;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-x: hidden;
}

.initiator-card {
  box-sizing: border-box;
  padding: 1rem;
  margin: 1rem auto;
  width: min(100%, 400px);
	display: flex;
	align-items: center;
	gap: 1rem;
	background-color: #ffffff;
  border-radius: 10px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);

  > .photo {
    max-width: 10rem;
    aspect-ratio: 1;
  	border-radius: 10px;
  }

	> .content > :is(.title, .id) {
		margin: 0;
		text-align: left;
	}

	> .content > .title {
		font-size: 20px;
	}

	> .content > .id {
		font-size: 16px;
	}
}

@media only screen and (max-width: 480px) {
	.buttons {
		display: block;
	}

	#qr-image {
		max-width: 90%;
	}

	.initiator-card {
	  flex-direction: column;

    > .photo {
      max-width: 100%;
    }
	}
}
