/* Responsive Keyboard Container */
.keyboard-container {
  display: grid;
  /* Wrap keys automatically when space is limited */
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 4px;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-top: 10px;
  width: 100%;
  height: 200px;
  overflow-y: scroll;
  align-content: start;
}

/* Apply math font to keys and input box */
.key-btn,
.main-input-box {
  font-family: 'Asana Math', serif;
}

/* Updated key button size */
.key-btn {
  width: 75px;
  height: 35px;
  font-size: 12px;
  background-color: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.key-btn:hover {
  background-color: #e0e0e0;
}

/* Input container for the toggle button */
.input-container {
  position: relative;
  width: 100%;
}

/* Toggle Button Styles */
.keyboard-toggle-btn {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, -15%);
  z-index: 2;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #333;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.keyboard-toggle-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  opacity: 0;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  0% {
    left: -50%;
    opacity: 0;
  }
  25% {
    left: 0%;
    opacity: 1;
  }
  75% {
    left: 100%;
    opacity: 1;
  }
  100% {
    left: 150%;
    opacity: 0;
  }
}

.keyboard-toggle-btn.open .feather-icon {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}
