/* fixed bottom 25% stays */
#toggleZone {
  height: 25dvh;
  overflow: visible;
  position: relative;
  background: transparent;

  z-index: 9999; /* a high z-index to ensure it stays on top */
}

#toggle-stack {
  position: absolute;
  width: var(--col-w);
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(var(--stack-y));
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;

  z-index: 10002; /* a higher z-index to ensure it stays above the toggle zone */
  pointer-events: none;
}

/* transparent spacer that increases in narrow mode */
.toggle-placeholder {
  width: 100%;
  height: var(--placeholder-h);
  flex: 0 0 var(--placeholder-h);
  background: transparent;
}

#toggleButton {
  width: calc(var(--col-w) * 0.15);
  height: calc(var(--col-w) * 0.075);
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 32px;
  border: 2px solid rgba(73, 72, 128, 1);
  color: #ff0000;
  text-shadow: 0 1px 3px rgb(255, 39, 39);
  position: absolute;
  left: 50%;
  top: 35%;
  transform: translate(-50%, -50%) scale(1);
  margin: 0;
  font-size: calc(var(--col-w) * 0.025);
  cursor: pointer;
  pointer-events: auto;
  text-align: center;
  box-shadow: 0 0 var(--glow-blur) var(--glow-color);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

#toggleZone .up {
  width: var(--col-w);
  justify-content: center;
  align-items: center;
  position: relative;
  display: block;
}

#toggleZone .create-form-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  width: var(--col-w);
  box-sizing: border-box;
  z-index: 10001; /* Ensure it appears above the toggle stack and zone */
}

#toggleZone .create-form-container .status-message-slot {
  width: calc(var(--col-w) * 0.5);
  max-width: 600px;
  align-self: center;
  min-height: 2.5em;
}

#toggleZone .create-form-container .status-message {
  width: 100%;
  font-size: calc(var(--col-w) * 0.015);
  text-align: center;
  padding: 8px;
  border-radius: 4px;
  font-weight: bold;
  margin: 0;
  box-sizing: border-box;
}

.create-form-container input {
  pointer-events: auto;
}

#img-title,
.username-container,
#img-file {
  font-family: "Arial", sans-serif;
  font-weight: bold;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0);
  font-size: clamp(8px, 2vw, 16px);
  width: calc(var(--col-w) * 0.5);
  max-width: 600px;
  height: calc(var(--col-w) * 0.05);
  background: rgb(255, 242, 242);
  border: 1px solid #49488a00;
  border-radius: 8px;
  padding: 20px;
  color: #000000;
  align-self: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0);
}

.username-container {
  font-size: clamp(8px, 2vw, 16px);
  color: #000000;
  align-self: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0);
}

.username-container::before {
  content: "Rancher's name: ";
  font-size: clamp(8px, 2vw, 16px);
  color: #000000;
  align-self: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0);
}

.cyber-file-input {
  width: calc(var(--col-w) * 0.5);
  height: calc(var(--col-w) * 0.035);
  padding: 8px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid #040130;
  color: #000000;
  font-family: inherit;
  font-size: clamp(8px, 2vw, 16px);
  box-sizing: border-box;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.cyber-file-input:hover,
.cyber-file-input:focus {
  border-color: #ddacee;
  box-shadow: 0 0 8px rgba(221, 172, 238, 0.5);
  outline: none;
}

.cyber-file-input::file-selector-button {
  background: #070717;
  color: #fefefe;
  border: 1px solid #ddacee;
  padding: 6px 12px;
  margin-right: 10px;
  cursor: pointer;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s ease-in-out;
}

.cyber-file-input::file-selector-button:hover {
  background: #ddacee;
  color: #000;
  box-shadow:
    0 0 10px #ddacee,
    0 0 20px #ddacee;
}

#btn-continue {
  width: calc(var(--col-w) * 0.15);
  height: calc(var(--col-w) * 0.05);
  background: rgba(129, 137, 255, 0.461);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 32px;
  border: 2px solid rgb(243, 243, 255);
  color: #ffffff;
  text-shadow: 0 1px 3px rgb(236, 231, 255);
  position: relative;
  margin: 0;
  font-size: calc(var(--col-w) * 0.025);
  cursor: pointer;
  pointer-events: auto;
  align-self: center;
  text-align: center;
  box-shadow: 0 0 var(--glow-blur) var(--glow-color);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

#action-buttons-container {
  position: fixed;
  gap: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--col-w);
  pointer-events: auto;
  z-index: 99999;
}

#action-buttons-container .action-buttons-banner {
  width: 100%;
  align-items: center;
}

#action-buttons-container .realtime-updates-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

#action-buttons-container .action-buttons-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#action-buttons-container .action-buttons-row {
  width: 100%;
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}

#action-buttons-container .col-6 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 8px;
}

#action-buttons-container .btn-toggle-action {
  width: calc(var(--col-w) * 0.2);
  min-height: 44px;
  margin: 0;
  align-self: center;
  justify-self: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#action-buttons-container .btn-toggle-action:hover,
#action-buttons-container .btn-toggle-action:focus,
#action-buttons-container .btn-toggle-action:active {
  background: rgba(129, 137, 255, 0.7);
  box-shadow: 0 0 8px rgba(129, 137, 255, 0.5);
  outline: none;
}

#toggle-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

#toggle-stack > div {
  margin: 0;
  padding: auto;
  border: none;
}

#image-create-form {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
