/* Ensure the table doesn't break the layout */
table {
  table-layout: fixed;
}

/* Styling for disabled form fields */
input:disabled, select:disabled {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Status monitor styling */
#status-monitor {
  resize: none;
  font-family: 'Courier New', monospace;
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

/* Make sure the header stays visible */
thead {
  position: sticky;
  top: 0;
  background-color: #f9fafb;
  z-index: 10;
}

/* Ensure modal is on top */
#channel-options-modal {
  z-index: 50;
}

/* Success/error messages */
.status-success {
  color: #047857;
}

.status-error {
  color: #b91c1c;
}

.status-info {
  color: #1e40af;
}

.status-warning {
  color: #b45309;
}

/* Highlight changed values */
.value-changed {
  background-color: #fef3c7;
  border-color: #f59e0b;
}

/* Form field styling */
input, select {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem !important;
  padding: 0.25rem 0.5rem !important;
  padding-left: 0.5rem !important;
  height: 2rem;
  box-sizing: border-box;
}

button {
  height: 2rem;
}

input:focus, select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Fix small inputs alignment */
.channel-label, .channel-enabled, .channel-rx-ctcss, .channel-tx-ctcss, .channel-tx-power {
  min-height: 2rem;
  width: auto;
}

/* Specific input widths */
.channel-label {
  width: 3rem !important;
}

.channel-rx-freq, .channel-tx-freq {
  width: 5.5rem !important;
}

/* Table select adjustments */
.channel-enabled, .channel-rx-ctcss, .channel-tx-ctcss, .channel-tx-power {
  padding-right: 1.75rem !important;
  background-position: right 0.3rem center;
  width: auto !important;
  min-width: 4.5rem;
}

/* Compact labels */
label {
  margin-bottom: 0.25rem;
  display: inline-block;
  font-size: 0.75rem;
}

/* Ensure consistent select appearance */
select {
  padding-left: 0.5rem !important;
  padding-top: 0.1rem !important;
  padding-bottom: 0.1rem !important;
  padding-right: 1.5rem !important;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.3rem center;
  background-size: 1em 1em;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
  #channels-table-body td {
    padding: 0.25rem 0.125rem;
    vertical-align: middle;
  }

  .channel-rx-freq, .channel-tx-freq {
    width: 80px;
  }
}

/* Make table more compact */
table td, table th {
  padding: 0.25rem 0.5rem;
  vertical-align: middle;
}

/* Collapsible section styling */
#toggle-general-config {
  cursor: pointer;
  padding: 0.25rem 0;
  border-radius: 0.25rem;
}

#toggle-general-config:hover {
  background-color: #f9fafb;
}

.rotate-180 {
  transform: rotate(180deg);
}

/* Compact instructions box */
.bg-blue-50 p, .bg-yellow-50 p {
  margin-bottom: 0.25rem;
}

/* Any Tailwind overrides */
@layer components {
  .form-group {
    @apply mb-2;
  }
}
