/* XKeypad Demo Styles */

.xkeypad-demo-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.xkeypad-demo-container h1 {
  color: #333;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
}

.demo-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.demo-section h2 {
  color: #495057;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.option-group {
  margin-bottom: 15px;
  padding: 10px;
  background: white;
  border-radius: 4px;
}

.option-group label {
  display: block;
  margin-bottom: 5px;
}

.option-group label strong {
  display: block;
  margin-bottom: 8px;
  color: #495057;
}

.option-group label input[type="radio"] {
  margin-right: 8px;
  margin-left: 15px;
}

.option-group label input[type="checkbox"] {
  margin-right: 8px;
}

.option-group > label > div {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.option-group > label > div > label {
  display: flex;
  align-items: center;
  margin: 0;
}

.input-group {
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 4px;
}

.input-group > label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  color: #495057;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-row input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}

.input-row input:hover {
  border-color: #80bdff;
}

.input-row input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.input-row button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.input-row button:hover {
  background-color: #0056b3;
}

.result {
  margin-top: 10px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  overflow-x: auto;
}

.demo-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}

.demo-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}

.demo-actions button:hover {
  opacity: 0.9;
}

.demo-actions button.secondary {
  background-color: #6c757d;
  color: white;
}

.demo-actions button.danger {
  background-color: #dc3545;
  color: white;
}

/* Modal Styles */
.xkeypad-modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  display: none;
}

.xkeypad-modal-wrapper.show {
  display: block;
}

.xkeypad-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.xkeypad-modal-wrapper.show .xkeypad-modal-overlay {
  opacity: 1;
}

.xkeypad-modal-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

.xkeypad-modal-wrapper.show .xkeypad-modal-container {
  transform: translateY(0);
}

.xkeypad-modal-content {
  position: relative;
  width: 100%;
  height: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .xkeypad-demo-container {
    padding: 10px;
  }

  .demo-section {
    padding: 15px;
  }

  .input-row {
    flex-direction: column;
  }

  .input-row input {
    width: 100%;
  }

  .input-row button {
    width: 100%;
  }

  .demo-actions {
    flex-direction: column;
  }

  .demo-actions button {
    width: 100%;
  }
}