/* XKeypad Demo Styles */

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

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

.xkeypad-demo-container h2 {
  color: #555;
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.xkeypad-demo-container h3 {
  color: #666;
  margin-top: 20px;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

/* Configuration Section */
.config-section {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.config-group {
  margin-bottom: 20px;
}

.config-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
}

.config-group strong {
  display: block;
  margin-bottom: 10px;
  color: #444;
}

.radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.radio-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}

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

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

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

/* Input Section */
.input-section {
  background: #fff;
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 30px;
}

.input-group {
  margin-bottom: 30px;
  padding: 20px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.input-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.input-group input[type="password"],
.input-group input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.3s;
}

.input-group input[type="password"]:hover,
.input-group input[type="text"]:hover {
  border-color: #4CAF50;
}

.input-group input[type="password"]:focus,
.input-group input[type="text"]:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Buttons */
.submit-btn {
  margin-top: 10px;
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-btn:hover {
  background: #45a049;
}

.submit-btn:active {
  transform: translateY(1px);
}

.control-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
}

.control-btn {
  padding: 12px 30px;
  background: #2196F3;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.control-btn:hover {
  background: #1976D2;
}

.control-btn.clear-btn {
  background: #f44336;
}

.control-btn.clear-btn:hover {
  background: #d32f2f;
}

/* Result Box */
.result-box {
  margin-top: 15px;
  padding: 15px;
  background: #e8f5e9;
  border: 1px solid #4CAF50;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.result-box h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #2e7d32;
}

.result-box p {
  margin: 5px 0;
  word-break: break-all;
  color: #333;
}

.result-box .encrypted {
  color: #d32f2f;
  font-size: 12px;
}

/* Info Section */
.info-section {
  background: #fff3e0;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #ffb74d;
}

.info-section ul {
  margin: 0;
  padding-left: 25px;
}

.info-section li {
  margin: 10px 0;
  color: #555;
  line-height: 1.6;
}

/* Keypad Container Styles */
[id^="xk-pad-"] {
  margin-top: 10px;
  position: relative;
  min-height: 50px;
}

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

  .radio-group {
    flex-direction: column;
    gap: 10px;
  }

  .input-group input[type="password"],
  .input-group input[type="text"] {
    max-width: 100%;
  }

  .control-buttons {
    flex-direction: column;
  }

  .control-btn {
    width: 100%;
  }
}

/* Loading State */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

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

/* Error Message */
.error-message {
  padding: 10px;
  background: #ffebee;
  border: 1px solid #ef5350;
  border-radius: 4px;
  color: #c62828;
  margin-top: 10px;
}

/* Success Message */
.success-message {
  padding: 10px;
  background: #e8f5e9;
  border: 1px solid #66bb6a;
  border-radius: 4px;
  color: #2e7d32;
  margin-top: 10px;
}