/* Debug Context Box - Tenant Context Debugging Tool */

.debug-context-toggle {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ff6b6b;
  border: 2px solid #fff;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.debug-context-toggle:hover {
  background: #ff5252;
  transform: scale(1.1);
}

.debug-context-box {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 400px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border: 2px solid #ff6b6b;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dark-theme .debug-context-box {
  background: #2a2a2a;
  border-color: #ff6b6b;
  color: #e0e0e0;
}

.debug-context-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ff6b6b;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.debug-context-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.debug-context-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.debug-context-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.debug-context-content {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.debug-section {
  margin-bottom: 16px;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 4px;
  border-left: 3px solid #ff6b6b;
}

body.dark-theme .debug-section {
  background: #1a1a1a;
  border-left-color: #ff6b6b;
}

.debug-section-title {
  font-weight: bold;
  color: #ff6b6b;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.debug-field {
  margin: 6px 0;
  display: flex;
  gap: 8px;
}

.debug-label {
  font-weight: 600;
  color: #666;
  min-width: 100px;
}

body.dark-theme .debug-label {
  color: #999;
}

.debug-value {
  color: #333;
  word-break: break-word;
}

body.dark-theme .debug-value {
  color: #e0e0e0;
}

.debug-list {
  margin: 8px 0 0 0;
  padding-left: 16px;
}

.debug-list-item {
  margin: 4px 0;
  color: #555;
}

body.dark-theme .debug-list-item {
  color: #aaa;
}

.debug-empty {
  color: #999;
  font-style: italic;
}

.debug-meta {
  font-size: 11px;
  color: #999;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

body.dark-theme .debug-meta {
  border-top-color: #444;
}

.debug-error {
  background: #fff3f3;
  border-left-color: #ff4444;
  color: #cc0000;
}

body.dark-theme .debug-error {
  background: #2a1a1a;
  color: #ff6b6b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .debug-context-toggle {
    top: 60px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .debug-context-box {
    top: 60px;
    right: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 80px);
  }

  .debug-context-content {
    font-size: 12px;
  }

  .debug-label {
    min-width: 80px;
  }
}
