/* Session name display and management */
.session-box {
  background: #f0f4ff;
  border: 1px solid #b0c0e0;
  border-radius: 6px;
  padding: 1em 1.2em;
  margin-bottom: 1.5em;
}

.session-box h2 {
  margin: 0 0 0.4em;
  font-size: 1em;
  color: #444;
}

.session-name {
  font-size: 1.4em;
  font-weight: bold;
  color: #2244aa;
  text-transform: capitalize;
}

.name-change {
  display: flex;
  gap: 0.5em;
  margin-top: 0.7em;
  align-items: center;
}

.name-change input {
  padding: 0.3em 0.5em;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 0.95em;
  width: 160px;
}

.name-change button {
  padding: 0.3em 0.8em;
  border: none;
  border-radius: 4px;
  background: #3355cc;
  color: white;
  cursor: pointer;
  font-size: 0.95em;
}

.name-change button:hover {
  background: #2244aa;
}

#name-status {
  font-size: 0.9em;
  color: #555;
}

#name-status.error {
  color: #cc2222;
}

/* ESP-NOW MAC address configuration */
.btn-active {
  background-color: #4CAF50 !important;
  color: white !important;
  border: 2px solid #45a049 !important;
}

.btn-flash {
  animation: flash-green 0.5s;
}

@keyframes flash-green {
  0%, 100% { background-color: initial; }
  50% { background-color: #4CAF50; color: white; }
}

.mac-section {
  display: none;
  margin-top: 20px;
}

.mac-section.active {
  display: block;
}

.mac-inputs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

.mac-input {
  width: 50px;
  text-align: center;
  padding: 0.3em 0.5em;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 0.95em;
}

.mac-input.invalid {
  border-color: #dc3545;
  background-color: #ffe6e6;
  color: #721c24;
}

/* Firmware generation controls */
.generate-button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

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

.generate-button.clicked {
  background-color: #28a745;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

.output-container {
  padding: 15px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 5px;
}

.output-text {
  padding: 10px;
  background-color: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #333;
  border-radius: 3px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ok-button {
  margin-top: 10px;
  padding: 8px 20px;
  font-size: 14px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

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

.success-indicator {
  color: #28a745;
  font-weight: bold;
}

.error-indicator {
  color: #dc3545;
  font-weight: bold;
}

/* Download firmware controls */
.download-button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  display: inline-block;
}

.download-button:hover {
  background-color: #218838;
}

.download-button:active {
  background-color: #1e7e34;
}

.file-info {
  margin-top: 10px;
  padding: 10px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  font-size: 14px;
  color: #495057;
}

.no-file-message {
  color: #6c757d;
  font-style: italic;
}
