/* Add these rules to the brand-ui.css file, at an appropriate location */

/* SDA Visualization Styles */
.leos-dial-btn-icon.trackall {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300cfff'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z'/%3E%3C/svg%3E");
  background-size: contain;
}

/* SDA Object Styles */
#tle-input-modal {
  z-index: 10000;
}

.sda-tooltip {
  position: fixed;
  background: rgba(0, 23, 40, 0.95);
  border: 2px solid #00cfff;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 11px;
  max-width: 280px;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 15px rgba(0, 207, 255, 0.6);
  font-family: 'Orbitron', monospace;
}

.sda-tooltip h4 {
  margin: 0 0 8px;
  color: #00cfff;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 207, 255, 0.3);
  padding-bottom: 4px;
}

.sda-tooltip p {
  margin: 4px 0;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  line-height: 1.3;
}

.sda-tooltip strong {
  color: #66d9ff;
}

.sda-tooltip .orbit-class {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 5px;
  font-size: 10px;
  font-weight: bold;
}

.sda-tooltip .leo { background: rgba(0, 255, 255, 0.2); }
.sda-tooltip .meo { background: rgba(255, 255, 0, 0.2); }
.sda-tooltip .geo { background: rgba(255, 0, 0, 0.2); }
.sda-tooltip .heo { background: rgba(128, 0, 255, 0.2); }
.sda-tooltip .user { background: rgba(255, 255, 255, 0.2); }

/* SDA Legend */
.sda-legend {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 23, 40, 0.96);
  border: 2px solid #00cfff;
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 13px;
  color: white;
  z-index: 1000;
  display: none;
  width: 520px;
  min-height: 240px;
  box-shadow: 0 0 30px rgba(0, 207, 255, 0.5);
  font-family: 'Orbitron', monospace;
  backdrop-filter: blur(5px);
}

.sda-legend.visible {
  display: block;
}

.sda-legend h4 {
  margin: 0 0 15px;
  color: #00cfff;
  font-size: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-bottom: 1px solid rgba(0, 207, 255, 0.3);
  padding-bottom: 10px;
}

.beta-badge {
  background: #ff6600;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
}

.sda-legend h5 {
  margin: 15px 0 8px;
  color: #66d9ff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-left: 3px solid #00cfff;
  padding-left: 10px;
}

.sda-content {
  display: block;
}

.sda-section {
  margin-bottom: 18px;
}

.sda-section:last-child {
  margin-bottom: 0;
}

.sda-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.sda-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin: 4px 0;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.sda-legend-item:hover {
  background: rgba(0, 207, 255, 0.05);
}

.sda-legend-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.sda-legend-left span {
  margin-left: 0;
}

.sda-toggle {
  width: 28px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  margin-left: 8px;
  flex-shrink: 0;
}

.sda-toggle.active {
  background: #00cfff;
}

.sda-toggle-slider {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

.sda-toggle.active .sda-toggle-slider {
  transform: translateX(14px);
}

.sda-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

.sda-legend-color.leo { background-color: #33ffff; }
.sda-legend-color.meo { background-color: #ffff33; }
.sda-legend-color.geo { background-color: #ff3333; }
.sda-legend-color.heo { background-color: #ff33ff; }
.sda-legend-color.debris { background-color: #ff8833; }
.sda-legend-color.user { background-color: #ffffff; }
.sda-legend-color.real { background-color: #ffffff; }

/* Mode Indicator */
.sda-mode-indicator {
  background: rgba(0, 207, 255, 0.1);
  border: 1px solid rgba(0, 207, 255, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
}

.mode-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mode-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
}

.mode-badge.real {
  background: #00ff64;
  color: #000;
}

.mode-badge.hybrid {
  background: #ffc800;
  color: #000;
}

.mode-badge.static {
  background: #ff6600;
  color: #fff;
}

.mode-badge.loading {
  background: #666;
  color: #fff;
}

.mode-text {
  font-size: 11px;
  color: #cccccc;
  line-height: 1.4;
  flex: 1;
  white-space: normal;
  word-wrap: break-word;
}

/* Data Source Info */
.data-source-info {
  font-size: 11px;
  margin-top: 6px;
}

.data-source-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.source-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.source-label {
  color: #cccccc;
  font-size: 11px;
}

.source-value {
  color: #00cfff;
  font-weight: bold;
  font-size: 12px;
}

/* SDA Data Browser */
.sda-data-browser {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 23, 40, 0.96);
  border: 2px solid #00cfff;
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 13px;
  color: white;
  z-index: 1000;
  display: none;
  width: 520px;
  min-height: 240px;
  box-shadow: 0 0 30px rgba(0, 207, 255, 0.5);
  font-family: 'Orbitron', monospace;
  backdrop-filter: blur(5px);
}

.sda-data-browser.visible {
  display: flex;
  flex-direction: column;
}

.sda-data-browser h4 {
  margin: 0 0 15px;
  color: #00cfff;
  font-size: 16px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 207, 255, 0.3);
  padding-bottom: 10px;
}

.sda-search-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.sda-search-input {
  flex: 1;
  background: rgba(0, 207, 255, 0.1);
  border: 1px solid rgba(0, 207, 255, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  color: white;
  font-size: 12px;
  font-family: 'Orbitron', monospace;
}

.sda-search-input::placeholder {
  color: #888;
}

.sda-filter-select {
  background: rgba(0, 207, 255, 0.1);
  border: 1px solid rgba(0, 207, 255, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  color: white;
  font-size: 12px;
  font-family: 'Orbitron', monospace;
}

.sda-data-list {
  height: 180px;
  overflow-y: auto;
  border: 1px solid rgba(0, 207, 255, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
}

.sda-data-item {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 207, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s;
}

.sda-data-item:hover {
  background: rgba(0, 207, 255, 0.1);
}

.sda-data-item.expanded {
  background: rgba(0, 207, 255, 0.05);
}

.sda-data-item.highlighted {
  background: rgba(0, 207, 255, 0.2) !important;
  border: 1px solid rgba(0, 207, 255, 0.5);
  animation: fadeHighlight 3s ease-out;
}

@keyframes fadeHighlight {
  0% { background: rgba(0, 207, 255, 0.4) !important; }
  100% { background: rgba(0, 207, 255, 0.05) !important; }
}

.sda-data-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.sda-data-name {
  color: #00cfff;
  font-weight: bold;
}

.sda-data-class {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
}

.sda-data-details {
  margin-top: 8px;
  font-size: 11px;
  color: #ccc;
  display: none;
}

.sda-data-item.expanded .sda-data-details {
  display: block;
}

.sda-data-row {
  display: flex;
  justify-content: space-between;
  margin: 2px 0;
}

/* Add TLE Button */
.add-tle-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(0, 207, 255, 0.2);
  border: 1px solid var(--neon-blue);
  border-radius: 5px;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 1000;
  font-size: 12px;
  font-family: var(--font-primary);
  display: none;
}

.add-tle-button.visible {
  display: block;
}

.add-tle-button:hover {
  background-color: rgba(0, 207, 255, 0.4);
}

/* SDA Welcome Modal Styles */
.sda-modal {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.info-section {
  margin-bottom: 1.5em;
}

.info-section h3 {
  color: #66d9ff;
  margin-bottom: 0.5em;
  font-size: 1.1em;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em;
  margin: 0.5em 0;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.category-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.data-list, .tips-list {
  margin: 0.5em 0;
  padding-left: 1em;
}

.data-list li, .tips-list li {
  margin-bottom: 0.3em;
  color: #ffffff;
}

/* SDA Modal improvements */
.sda-modal .info-section {
  margin-bottom: 1.8em;
}

.sda-modal .info-section h3 {
  margin-bottom: 0.8em;
}

.sda-modal .info-section p {
  line-height: 1.6;
  margin-bottom: 0.8em;
}

.sda-modal .info-section p:last-child {
  margin-bottom: 0;
}
