/* Mode/Tab Navigation Styles */

.tab-container {
  margin-bottom: 40px;
}

.tab-container input[type="radio"] {
  display: none;
}

/* Mode-level navigation */
.mode-container {
  border-radius: 6px;
  margin-bottom: 24px;
  overflow: hidden;
}

.mode-nav {
  display: flex;
  gap: 1px;
  background: #f9fafb;
  padding: 2px;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

.mode-btn {
  flex: 1;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  background: white;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  letter-spacing: 0.4px;
  color: #555;
  border-radius: 4px;
}

.mode-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Active mode styles */
#mode-configure:checked ~ .mode-container .mode-btn[for="mode-configure"],
#mode-operate:checked ~ .mode-container .mode-btn[for="mode-operate"],
#mode-relate:checked ~ .mode-container .mode-btn[for="mode-relate"] {
  background: #353635;
  color: white;
  box-shadow: 0 2px 4px rgba(53, 54, 53, 0.2);
}

/* Sub-tab navigation */
.sub-nav {
  background: #f9fafb;
  padding: 15px 10px;
}

.sub-tabs {
  display: none;
  border-bottom: none;
  padding-bottom: 0;
  gap: 4px;
}

.sub-tabs label {
  display: inline-block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  margin-right: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #555;
}

.sub-tabs label:hover {
  background: #d1d5db;
  color: #374151;
  border-color: #9ca3af;
}

/* Show appropriate sub-tabs based on active mode */
#mode-configure:checked ~ .mode-container .configure-tabs,
#mode-operate:checked ~ .mode-container .operate-tabs,
#mode-relate:checked ~ .mode-container .relate-tabs {
  display: flex;
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Active sub-tab styles */
#tab-profile:checked ~ .mode-container .sub-tabs label[for="tab-profile"],
#tab-preferences:checked
  ~ .mode-container
  .sub-tabs
  label[for="tab-preferences"],
#tab-operations:checked ~ .mode-container .sub-tabs label[for="tab-operations"],
#tab-active:checked ~ .mode-container .sub-tabs label[for="tab-active"],
#tab-inbox:checked ~ .mode-container .sub-tabs label[for="tab-inbox"],
#tab-bus:checked ~ .mode-container .sub-tabs label[for="tab-bus"],
#tab-status:checked ~ .mode-container .sub-tabs label[for="tab-status"] {
  background: #353635;
  color: white;
  border-color: #353635;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(53, 54, 53, 0.2);
}

.tab-panels {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 32px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content {
  display: none;
}

#tab-profile:checked ~ .tab-panels #profile-content,
#tab-preferences:checked ~ .tab-panels #preferences-content,
#tab-operations:checked ~ .tab-panels #operations-content,
#tab-active:checked ~ .tab-panels #active-content,
#tab-inbox:checked ~ .tab-panels #inbox-content,
#tab-bus:checked ~ .tab-panels #bus-content,
#tab-status:checked ~ .tab-panels #status-content {
  display: block;
}
